This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes Calling Stored Procedure from Spring StoredProcedure throws Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply locked New topic
Author

Calling Stored Procedure from Spring StoredProcedure throws Exception

Sean Shrestha
Greenhorn

Joined: Apr 01, 2010
Posts: 2
I am using Spring JDBC to call SQL statements. Recently I wrote a service to call a SP on Oracle from Spring. As explained on the Spring documentation on the link below, I created a class that extends StoredProcedure and everything that has been explained.

http://static.springsource.org/sprin...toredProcedure


I am getting the following exception.

parameter spName has the schema name and the SP name. example: [schema].[sp_test]

When I just run the SP on DBVisualizer Query Browser, the SP executes as desired.

This is the first time I am writing Spring to call SP. Please suggest me what I am missing. Thanks in advance.
Sean Shrestha
Greenhorn

Joined: Apr 01, 2010
Posts: 2
fixed it by just making this change.

sushant verma
Greenhorn

Joined: Jun 08, 2011
Posts: 8
Hi, I'm bit confused with the calling pattern of Stored Procedure using jdbcTemplate.
Do i need to add a new class everytime a new SP is to be called?

I WANT to call a SP with some IN and OUT parameters and want to store the result in some DTO object and want to do this using spring in such a manner
that many functions can be listed in a sinlge class some XXXDAO.java

So that it can be called from a bllImp class with some input arguments and gets a class object DTO/String/List/Result set in return.

Please give a running example or provide a .war with the example code or any link where i can clear my doubts.

Thanks in Advance.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

This thread is over a year old. Please don't resurrect old threads. Just create a new thread with your new question.

Thanks, I am going to close this thread.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Calling Stored Procedure from Spring StoredProcedure throws Exception
 
Similar Threads
SQLException: ORA-01008
Callign an oragle package in Java with JDBC
Passing specific format date to callable statement
invalid host/bind variable name
SQLException: ORA-01008