Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
padma beerelli
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to spring and getting below exception





and from Data Access Object
 
padma beerelli
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
padma beerelli
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thank you for reply.

I changed as per your suggestion but didnot work.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic