Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

How to use storedProcedure in Hibernate 3

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new to Hibernate.
I have an application where stored procedure needs to be called from Hibernate 3 using
NamedQuery as given below. I am using oracle as DB. my stored procedure Name is: 'storedprocedure_test'


My question:
1. I am getting error as:


but, when i run that Stored procedure in DB, i am getting proper result.
Can anyone please help me how to execute the NamedQuery ?

my stored procedure is having two input parameters and two output parameters

Any one please help. I searched a lot in google but, no luck.
 
Bartender
Posts: 3648
16
Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sure there are lots of resources on Google about calling store proc in Hibernate. Below is one for MySQL. The idea is the same for any other DB.
Hibernate calling MySQL store proc
 
Anu satya
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tsang,
I have already tried all the google options.
But, struck at one point. That is:

1. For Hibernate, Is it possible to call a stored Procedure which accepts 2 input parameters and 2 output parameteres?

Can you please help me with this?





 
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Hibernate dosent suuport multiple output parameters refer this thread.
and multiple input parameters can be pass to stored procedure.

Regards
Jatan
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!