Native Oracle Query and Hibernate Error

Discussion in 'Java' started by puneet.bansal@wipro.com, Jun 11, 2007.

  1. Guest

    Has anybody run into an issue with Hibernate/JPA where an Oracle query
    runs fine on SQL Plus but gives an error 'ORA-00900: invalid SQL
    statement' when the same query is executed as a native query through
    Hibernate/JPA? I can't figure out why the query would run on Oracle
    client but fail when Hibernate tries to execute it.

    Any ideas?

    Thanks.
    Puneet
     
    , Jun 11, 2007
    #1
    1. Advertising

  2. Guest

    On Jun 11, 10:06 am, wrote:
    > Has anybody run into an issue with Hibernate/JPA where an Oracle query
    > runs fine on SQL Plus but gives an error 'ORA-00900: invalid SQL
    > statement' when the same query is executed as a native query through
    > Hibernate/JPA? I can't figure out why the query would run on Oracle
    > client but fail when Hibernate tries to execute it.
    >
    > Any ideas?
    >
    > Thanks.
    > Puneet


    Alright, it was a silly mistake. I was using 'createNativeQuery'
    instead of 'createNamedQuery'.

    Puneet
     
    , Jun 11, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ilias Lazaridis
    Replies:
    0
    Views:
    1,723
    Ilias Lazaridis
    Dec 27, 2004
  2. Replies:
    0
    Views:
    3,717
  3. Replies:
    0
    Views:
    696
  4. Amit Jain
    Replies:
    7
    Views:
    3,300
    Amit Jain
    Apr 27, 2009
  5. Feyruz
    Replies:
    4
    Views:
    2,185
    Sherm Pendley
    Oct 14, 2005
Loading...

Share This Page