Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.IllegalArgumentException: NamedQuery of name: catalog1 not found.

843830Aug 20 2008 — edited Aug 20 2008
hello.
I always get this error:java.lang.IllegalArgumentException: NamedQuery of name: catalog1 not found.
the structure is:
in glassfish's j2ee-apps/
test
----META-INF
----testweb_war
----test_service_jar
----eclipselink.jar
----test_domain.jar

testweb_war is jsf web application. it uses test_service_jar by @EJB annotion

test_service is ejb 3.0 application. it uses test_domain.jar by @PersistenceContext(unitName="test_domain") and so on

test_domain.jar is jpa application. it uses @Entity @NamedQuery and so on annotion, not orm.xml files

in test_service_jar, the META-INF/MANIFEST.MF context is :
Manifest-Version: 1.0
Class-Path: test_domain.jar

in test_domain.jar, the META-INF directory includes:persistence.xml,MANIFEST.MF

@NamedQuery(name="catalog1", query = "SELECT o FROM IncidentCatalog o WHERE o.code LIKE '__000' ORDER BY o.code") in test_domain.jar

@Override
public List<IncidentCatalog> getIncidentCatalogTop(){
return em.createNamedQuery("catalog1").getResultList();
} in test_service_jar

if I copy persistence.xml to test_service_jar/META-INF/
it seems to not any changed. the error is the same.

the database is postgresql, jpa implement is eclipselink.

thanks for any help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 17 2008
Added on Aug 20 2008
1 comment
1,221 views