File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


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
 
GeeCON Prague 2014
 
subject: Calling Stored proc using Hibernate @NamedNativeQuery