This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Spring and the fly likes org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar " Watch "org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar " New topic
Author

org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar

padma beerelli
Greenhorn

Joined: Mar 04, 2013
Posts: 6
Hi,

I am new to spring and getting below exception





and from Data Access Object
padma beerelli
Greenhorn

Joined: Mar 04, 2013
Posts: 6

and here is stored procedure

ROCEDURE get_retail_stores (in_flag IN VARCHAR2,
in_value IN VARCHAR2,
in_status IN VARCHAR2,
out_records OUT out_ref_cursor);
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17243
    
    1

Does the order of setting parameter types in the constructor important?

You have the out parameter first, but in the procedure it is the last parameter.

I haven't used the StoredProcedure class before, so this is a guess here.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
padma beerelli
Greenhorn

Joined: Mar 04, 2013
Posts: 6

Thank you for reply.

I changed as per your suggestion but didnot work.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17243
    
    1

Wait, I didn't notice this at first, but in your error

bad SQL grammar [{call USP_RETAIL_PKG.get_retail_stores(?, ?, ?)}]

There are three question marks there. Wouldn't there need to be 4?

I would assume that would be passing in the out paramter. Is that how it works?

Not sure, just something I noticed.

Mark
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar
 
Similar Threads
org.springframework.jdbc.BadSqlGrammarException:CallableStatementCallback; bad SQL grammar
Spring-RowMapper-DB2-Stored Procedure
Spring :Approach to call Stored Procedures
RowMapper & Stored Proc @ DB2
Spring StoredProcedure + RowMapper issue