users@glassfish.java.net

detecting persistence archive in ScatteredEar lib

From: <forums_at_java.net>
Date: Mon, 2 May 2011 07:49:49 -0500 (CDT)

 Hi,

I am trying to deploy java 6 + JPA 2\hibernate 3.6 application using embeeded
glassfish - scattered ear.

I downloaded the latest glassfish embedded jar:
glassfish-embedded-all-3.2-SNAPSHOT.

I've put the persistence.xml in a seperate jar and located the jar in ear
lib:


persitenceArchive =

*new ScatteredArchive("persistence.jar", ScatteredArchive.Type./JAR, *new
File(HOME+"persistence\\classes")); "lib/persistence.jar");
I see on deplyment that the persistence.jar appears in the temporary ear lib
directory. But the persistence archive is not proceessed. I know this because
there is no message on it in the console, and whe trying to access ejb method
which injects entityManager of this unit, I get the error:
java.lang.IllegalStateException: Unable to retrieve EntityManagerFactory for
unitName
entityManagerEntityManagerWrapper.java:132)EntityManagerWrapper.java:173)EntityManagerWrapper.java:565)RepositoryServiceBean.java:75)

I saw old bugs on this issue (persistence archive in exploaded ear not
proceeded), but they seemed to be solved. I sthere any known bug on this? 

Thanks.

*/*

Caused by:

at com.sun.enterprise.container.common.impl.EntityManagerWrapper.init(

at
com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(

at
com.sun.enterprise.container.common.impl.EntityManagerWrapper.createNamedQuery(

at xxx.core.RepositoryServiceBean.getFees(

enterpriseArchive.addArchive(persitenceArchive.toURI(),


--
[Message sent by forum member 'tovi']
View Post: http://forums.java.net/node/797357