File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Spring StoredProcedure + RowMapper issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring StoredProcedure + RowMapper issue" Watch "Spring StoredProcedure + RowMapper issue" New topic
Author

Spring StoredProcedure + RowMapper issue

Harry Dhina
Greenhorn

Joined: May 11, 2005
Posts: 6
Dear All

I'm using StoredProcedure to call a Oracle Stored Proc which as 10-11 in params and 2 out param which are Ref_Cursors.

Sample code is:

RowMapper:



StoredProc:



Now I get 1000 rows from my resultset. Each is a different Practice. I want to store this in a Collection of Practices.

Main Prog:



The problem I'm getting is when I print out the values of each practice, I get the same value (that is the Name of the last row of the resultset returned )and the same name is printed out 1000 times, instead of 1000 different practice names. Can somebody help me in what I'm missing. It would be of great help


Thanks

Harry
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
What you do in proc.execute(params)?


SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Harry Dhina
Greenhorn

Joined: May 11, 2005
Posts: 6
Kengkaj Sathianpantarit wrote:What you do in proc.execute(params)?



I execute the StoredProcedure by passing the IN params....
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
Can you post proc.execute source code?
Have you tried run this store procedure or debugged MyRowMapper.mapRow?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring StoredProcedure + RowMapper issue
 
Similar Threads
trouble passing array to stored procedure in spring HELP
calling stored procedure which returns SYS_REFCURSOR
Strange problem calling oracle function with spring
Calling Stored Procedure from jdbcTemplate
Spring :Approach to call Stored Procedures