[jboss-user] [EJB 3.0] - Re: Illegalargumentexception on calling namedquery

jaikiran do-not-reply at jboss.com
Mon Jun 9 06:48:23 EDT 2008


"auke at noppe.nl" wrote : this doesn't work either. i'm getting quite frustrated now, because 1 namequery works, but the others don't.
  | 
  | the one that works is:
  | 
  |   | @NamedQuery(name = "User.doLogin", query = "SELECT object(u) FROM User u WHERE u.naam = :uname AND u.password = :password")
  |   | 
  | 
  | and on the other entities the namedqueries work also.
  | are you able to get the problem from the stacktrace i posted in the first post?
  | 
  | many thanks!
  | 
  | Auke

Are you saying that most of the queries work except for the one you posted earlier, which is :

@NamedQuery(name = "User.getAllUsers", query = "SELECT u FROM User u"): 

This problem in this query is that there's a : at the end. But i dont see how it could have even passed the java compilation phase.

Can you post the exact code which contains this NamedQuery (which does not work) and the complete exception stacktrace? Just want to make sure, we are discussing about one single query.


 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156632#4156632

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156632



More information about the jboss-user mailing list