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
posted Mar 04, 2013 10:25:06
0
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
posted Mar 05, 2013 10:16:12
0
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