wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Calling Stored proc using Hibernate @NamedNativeQuery Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Calling Stored proc using Hibernate @NamedNativeQuery" Watch "Calling Stored proc using Hibernate @NamedNativeQuery" New topic
Author

Calling Stored proc using Hibernate @NamedNativeQuery

Ashiish Sharma
Greenhorn

Joined: Sep 16, 2009
Posts: 1
Hello,

I am a newbie in hibernate, I am using @javax.persistence.NamedNativeQuery to resolve my stored proc calls from hibernate to mysql but i am getting errors.

Please help:

My persistent class is:



My mysql stored proc is:



The main method that is calling this code is as:



My hibernate config file is as :



On code execution i am getting following error/exception:



Please help what is going wrong and help me get it corrected. Also refer me to suitable links where i can learn more about this technique.

My stack is:

Mysql Version 14.12 Distrib 5.0.67
Java
Hibernate 3

Thanks in advance

Ashish
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling Stored proc using Hibernate @NamedNativeQuery
 
Similar Threads
Hibernate: Mysql Auto Reconnect is not happening.
Problems with hibernate and mysql?
Error ##### org.hibernate.exception.GenericJDBCException: Cannot open connection
Hibernate Insert Error
Hibernate: Column not found. org.hibernate.exception.GenericJDBCException