NamedQuery

Hi,

I followed the tutorial regarding the NamedQuery. But having some problems.

1. there is no queryString="" method.

2. i used query="" instead of queryString. the code then compiles.

3. it compiles but when it's invoked, it throws an exception message "NamedQuery of name: myNamedQuery not found" when using the createNamedQuery() method of the EntityManager.

4. it works fine when i call the createQuery() method and doing same sql statement.

am i doing something wrong somewhere? please help.

regards,

andrew

[568 byte] By [bashdrewa] at [2007-10-3 3:33:17]
# 1

Which implementation are you using and where is the @NamedQuery annotation defined in your code?

Please post the source that shows the NamedQuery annotation and the full stack trace.

Here's the official javadoc for Java EE 5 :

http://java.sun.com/javaee/5/docs/api/

--ken

ksaksa at 2007-7-14 21:27:38 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
hi,i misplaced my @NamedQuery annotation.thanks. again.regards,andrew
bashdrewa at 2007-7-14 21:27:38 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...