• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

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

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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);
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thank you for reply.

I changed as per your suggestion but didnot work.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic