Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
    Bookmark Topic Watch Topic
  • New Topic

Calling Stored Procedure from Spring StoredProcedure throws Exception

 
Sean Shrestha
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
fixed it by just making this change.

 
sushant verma
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
 
    Bookmark Topic Watch Topic
  • New Topic