This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Urgent Help to call Stored Proc from Hibernate Mapping Exception.

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

I have a stored proc as given following:



tmp_usersreport is a global temp table defined in ORACLE DB.

My Hibernate mapping is called sp.hbm.xml:




My return DTO is:






Java Code to call stored proc:



Exception is:

Initial SessionFactory creation failed.org.hibernate.MappingException: Could not read mappings from resource: sp.hbm.xml
Exception in thread "main" java.lang.ExceptionInInitializerError
at HibernateUtil.<clinit>(HibernateUtil.java:17)
at test4.test(test4.java:55)
at test4.main(test4.java:17)
Caused by: org.hibernate.MappingException: Could not read mappings from resource: sp.hbm.xml

Please Help. This is my first post here.

Thanks in adv.
 
author & internet detective
Posts: 39392
763
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Jitu,
Welcome to JavaRanch!

I added code tags to your post. Note how it's easier to read.

This sounds like a question about the Hibernate side of things. I'll move it to our Object/Relational forum for you. There will be a link to it from the original JDBC location so it will be easy to find.
 
ranger
Posts: 17344
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is a duplicate post, so I am going to close this one.

Please do not duplicate post. Choose the most appropriate forum and just post in that one forum.

Thanks for understanding

Mark
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!