java.lang.IllegalArgumentException: NamedQuery of name: catalog1 not found.
843830Aug 20 2008 — edited Aug 20 2008hello.
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.