Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Native Oracle Query and Hibernate Error

Reply
Thread Tools

Native Oracle Query and Hibernate Error

 
 
puneet.bansal@wipro.com
Guest
Posts: n/a
 
      06-11-2007
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

 
Reply With Quote
 
 
 
 
puneet.bansal@wipro.com
Guest
Posts: n/a
 
      06-11-2007
On Jun 11, 10:06 am, puneet.ban...@wipro.com 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hibernate LazyInitializationException in web application Struts asMVC, Spring as IOC and Hibernate as ORM layer Amit Jain Java 7 04-27-2009 10:27 AM
Hibernate cannot find hibernate.cfg.xml jstorta Java 1 01-19-2008 01:45 PM
install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 230. Feyruz Perl Misc 4 10-14-2005 06:47 PM
Hibernate Syncronizer now generates code for Hibernate 3.0 msenin@covad.net Java 0 07-14-2005 05:47 AM
[HIBERNATE] [EVALUATION] - Gavin King Censors Hibernate Forum Ilias Lazaridis Java 0 12-27-2004 04:26 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57