• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate - SQLGrammarException

 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi when i am trying to get some values i am getting the exception




the exception i get is
net.sf.hibernate.exception.SQLGrammarException: Could not execute query

can any one explain me where i am was wrong.

teh code was taken from the net.
 
Sebastian Hennebrueder
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should post the complete stack trace, your db name, hibernate.cfg.xml. The field name could be wrong, the Dialect you configured or anything else.

Best Regards Sebastian
 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Sebastin

Thanks for your reply.

I solved the problem, i am using DB2 as my back end the problem is with the wrong schema is used when referring to the table.
 
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!