Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting HQL query to Criteria query

 
Aravind M Jay
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have this simple HQL query.




I have few Criteria queries which is used for the search functionality.
Between these two dates it searches for the data. This part is working fine.





But now my problem is
1. To combine my hqlQuery with this criteria query so that there is an additional condition for search i.e, search will now depend on the deptId that's passed.

2.


I tried this


But it is throwing this error


Please advice.

Thanks,
MJ
 
Aravind M Jay
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried the following to compile my query -





Now strQuery is -



But this query is not running and throwing this error -


In one of the forums saw this was due to the missing antlr.jar but I dont think so and moreover I have the antlr.jar in my lib folder

Please Advice.

Thanks,
MJ
 
Shailesh Kini
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Arvind,

You have a NoSuchMethodError, which implies the method being called does not exist. This could be the result of a version mismatch. Make sure you have the correct version of all your jar files.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic