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

unexpected token when doing createQuery on a stored procedure

 
Pierre Rehnberg
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I'm new at hibernate and I'm trying to execute a stored procedure but I'm not doing it right it seems.
This is what I try to do on a hibernate entity:



But I keep hitting QuerySyntaxExceptions like this:
Caused by: java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: FnGetAccountLogins near line 1, column 15 [select a from FnGetAccountLogins('CDG%') a]


Can someone point me in the right direction to overcome this?

cheers
 
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!