[ 
https://issues.apache.org/jira/browse/GERONIMO-4539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675281#action_12675281
 ] 

David Jencks commented on GERONIMO-4539:
----------------------------------------

Hi Ivan,

I'm not sure we've found the problem yet.  I think all the gbeans in the ear 
get the same artfiactID part of the abstract name.  Probably the configuration 
gbean ffor the war should get the same artifactId part as the ear and just have 
a different configurationName part but I don't recall the reasoning around this 
very clearly.

Anyway what confuses me is that it looks to me as if the query in the error 
message is exactly the same as the persistence unit abstract name you show so I 
don't understand why the query isn't finding the gbean.  Is the ref looking in 
the correct configuration (the one for the war, not for the ear)?

> Deployment failed if JPA PU jar in web module
> ---------------------------------------------
>
>                 Key: GERONIMO-4539
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4539
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 2.1.4, 2.2
>            Reporter: Forrest Xia
>         Attachments: my-ear-1.0-SNAPSHOT_PUjarinwebclasses_ejbjarinweblib.ear
>
>
> If putting JPA persistence unit jar and JPA entity bean jar in web module 
> WEB-INF/lib, then to deploy it as part of ear, a deployment exception as 
> follows:
> At least one deployment 
> problem:org.apache.geronimo.common.DeploymentException: Could not resolve 
> reference at deploy time for query 
> com.heilgeist.testcase.geronimo.jarfile/my-ear/1.0-SNAPSHOT/ear?J2EEApplication=com.heilgeist.testcase.geronimo.jarfile/my-ear/1.0-SNAPSHOT/ear,PersistenceUnitModule=WEB-INF/lib/my-pu-1.0-SNAPSHOT_inclasses.jar,WebModule=my-war-1.0-SNAPSHOT.war,j2eeType=PersistenceUnit,name=myPU#.
>  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 
> com.heilgeist.testcase.geronimo.jarfile/my-ear/1.0-SNAPSHOT/ear?J2EEApplication=com.heilgeist.testcase.geronimo.jarfile/my-ear/1.0-SNAPSHOT/ear,PersistenceUnitModule=WEB-INF/lib/my-pu-1.0-SNAPSHOT_inclasses.jar,WebModule=my-war-1.0-SNAPSHOT.war,j2eeType=PersistenceUnit,name=myPU#.
>  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.web25.deployment.AbstractWebModuleBuilder.configureBasicWebModuleAttributes(AbstractWebModuleBuilder.java:842)
> at 
> org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:347)
> at 
> org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
> 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(NativeMethodAccessorImpl.java:45)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> at java.lang.reflect.Method.invoke(Method.java:599)
> 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(Thread.java:735)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to