aspose file tools*
The moose likes Spring and the fly likes org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
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: 17257
    
    6

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: 17257
    
    6

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
 
 
subject: org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar