I am trying to execute two JPQL queries in an EJB3 application deployed on a JBoss 4.2.2.GA. The code looks as follows:
While the first query works fine, the second one results in the following error:
Even more strange: When I try to switch to a numbered parameter, like this
the error message stays the same and still complains about a named parameter:
This is also not affected by whether I pass the parameter value as int (2), String ("2") or Integer (new Integer(2)). The only difference I can notice between the two queries is that in the second one I'm using a fully qualified name for the persisted Entity because the class is defined in a different package. Maybe Hibernate gets confused by that?
Can anybody give me a hint? I'm totally out of ideas. [ June 03, 2008: Message edited by: Johannes Koch ]