geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Jiang <genspr...@gmail.com>
Subject Re: Could not resolve reference for persistence/jpaEntity#org.apache.geronimo.persistence.PersistenceUnitGBean
Date Thu, 25 Jun 2009 01:38:35 GMT
To make Geronimo find the PU, I think the structure of your EAR should be
like this:
META-INF/MANIFEST.MF
       /geronimo-application.xml
lib/jpaFacadeClient.jar
lib/jpaEntity.jar
jpaFacade.jar


I also saw a <jta-data-source>OracleDS</jta-data-source>  in your
persistence.xml.  You should add this datasource module as a dependency in
geronimo-application.xml

On Thu, Jun 25, 2009 at 4:05 AM, pookie1973 <christopher.adkin@nhs.net>wrote:

>
> I'm using Geronimo 2.1, I have an ear file containing an EJB project with a
> single stateless session bean and a JPA project containing four entity
> beans. When I export the ear file and deploy it to Geronimo via the
> console,
> I get:-
>
> At least one deployment
> problem:[org.apache.geronimo.common.DeploymentException: Could not resolve
> reference at deploy time for query
>
> ?name=persistence/jpaEntity#org.apache.geronimo.persistence.PersistenceUnitGBean.
> No GBean references found.]
> org.apache.geronimo.common.DeploymentException: At least one deployment
> problem:[org.apache.geronimo.common.DeploymentException: Could not resolve
> reference at deploy time for query
>
> ?name=persistence/jpaEntity#org.apache.geronimo.persistence.PersistenceUnitGBean.
> No GBean references found.]
>        at
>
> org.apache.geronimo.persistence.builder.PersistenceUnitRefBuilder.buildNaming(PersistenceUnitRefBuilder.java:154)
>        at
>
> org.apache.geronimo.j2ee.deployment.NamingBuilderCollection.buildNaming(NamingBuilderCollection.java:53)
>        at
>
> org.apache.geronimo.openejb.deployment.EjbDeploymentBuilder.addEnc(EjbDeploymentBuilder.java:329)
>        at
>
> org.apache.geronimo.openejb.deployment.EjbDeploymentBuilder.buildEnc(EjbDeploymentBuilder.java:294)
>        at
>
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.addGBeans(EjbModuleBuilder.java:764)
>        at
>
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
>        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
>        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at
>
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>        at
>
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>        at
>
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>        at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>        at
>
> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
>        at
>
> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
>        at java.lang.Thread.run(Unknown Source)
>
> I searched the internet in order to see if anyone else encountered this
> issue. I found that Shawn (Jiang) responded to someone who had exactly the
> same issue as myself on IBM DeveloperWorks. Shawn asked for the EAR package
> structure, here it is:-
>
> Top level:-
>
> META-INF/MANIFEST.MF
>        /geronimo-application.xml
> jpaFacadeClient.jar
> jpaFacade.jar
> jpaEntity.jar
>
> If I unzip the ear file and run a jar tvf on the jpaEntity.jar file I
> have:-
>
> C:\jpaTestEAR\jpaEntity>jar tvf jpaEntity.jar
>    58 Wed Jun 24 12:31:06 BST 2009 META-INF/MANIFEST.MF
>     0 Tue Jun 23 22:12:06 BST 2009 com/jpaEntity/
>   313 Tue Jun 23 22:08:26 BST 2009 META-INF/orm.xml
>     0 Tue Jun 23 22:08:26 BST 2009 META-INF/
>  1654 Wed Jun 24 14:00:16 BST 2009 com/jpaEntity/test/Dept.class
>  1353 Wed Jun 24 14:00:16 BST 2009 com/jpaEntity/test/Bonus.class
>     0 Tue Jun 23 22:12:42 BST 2009 com/jpaEntity/test/
>     0 Tue Jun 23 22:12:06 BST 2009 com/
>   686 Wed Jun 24 13:52:16 BST 2009 META-INF/persistence.xml
>  1124 Wed Jun 24 14:00:16 BST 2009 com/jpaEntity/test/Salgrade.class
>  2702 Wed Jun 24 14:00:16 BST 2009 com/jpaEntity/test/Emp.class
>
> Shawn also requested the EAR file, which I will attach. Previously I had
> attempted to deploy this directly to the app server from Eclipse and I
> wasn't getting as far as this. I posted a question to which Shawn
> responded,
> I did not reply to this as my second son was born on Monday, hence I was a
> tad proccupied with other things, so Shawn is you read this I wasn't
> blanking you out, but many thanks for responding my last question in such a
> prompt manner anyway. http://www.nabble.com/file/p24191944/jpaTestEAR.ear
> jpaTestEAR.ear
> --
> View this message in context:
> http://www.nabble.com/Could-not-resolve-reference-for-persistence-jpaEntity-org.apache.geronimo.persistence.PersistenceUnitGBean-tp24191944s134p24191944.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>


-- 
Shawn

Mime
View raw message