Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception while setMaxResults() - ORA-00918 error (HibernatePersistence for EJB 3.0 entity beans)

 
Pushker Chaubey
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi experts,

Earlier we were using Toplink for JPA. And now we are migrating to hibernatePersistence implementation for JPA.
There are some queries where we were using setMaxResults(). Now this is giving error with the hibernatePersistence. it gives "ORA-00918 error".

If we comment the setMaxResults(), it starts working fine.

Please tell me the possible cause of the error and how to get around it.

Thanks in advance!
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post the code ??
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ORA-00918 == "column ambiguously defined". Try turning on sql logging (hibernate.show_sql=true) and see what SQL it generates.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!