Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 37346 invoked from network); 20 Feb 2009 02:04:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2009 02:04:26 -0000 Received: (qmail 21633 invoked by uid 500); 20 Feb 2009 02:04:25 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 21574 invoked by uid 500); 20 Feb 2009 02:04:25 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 21565 invoked by uid 99); 20 Feb 2009 02:04:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Feb 2009 18:04:25 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Feb 2009 02:04:23 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D1A6C234C495 for ; Thu, 19 Feb 2009 18:04:01 -0800 (PST) Message-ID: <836009019.1235095441844.JavaMail.jira@brutus> Date: Thu, 19 Feb 2009 18:04:01 -0800 (PST) From: "Ivan (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Commented: (GERONIMO-4539) Deployment failed if JPA PU jar in web module In-Reply-To: <133572833.1234950661768.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/GERONIMO-4539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675216#action_12675216 ] Ivan commented on GERONIMO-4539: -------------------------------- Thanks for your response, David. >From what I see, this error occured when no name/unitname is set for the persistentunit annotation, so Geronimo server will try to find a default entitymanagerFactory. In the searching process, there is some logic to check whether we could load the PersistentUnitGBean from the Configuration. In this scenario, the persistence.xml file is located in the web-module's lib folder. So, Geronimo will add a PersistentUnitGBean to the webModule's Configuration object. The abstractName of the webmodule is {com.heilgeist.testcase.geronimo.jarfile/my-ear_my-war-1.0-SNAPSHOT.war/1.0-SNAPSHOT/car}?configurationName=com.heilgeist.testcase.geronimo.jarfile/my-ear_my-war-1.0-SNAPSHOT.war/1.0-SNAPSHOT/car While the PersistentUnitGBean's abstractName is {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] Configuration [com.heilgeist.testcase.geronimo.jarfile/my-ear_my-war-1.0-SNAPSHOT.war/1.0-SNAPSHOT/car?configurationName=com.heilgeist.testcase.geronimo.jarfile/my-ear_my-war-1.0-SNAPSHOT.war/1.0-SNAPSHOT/car Althougth the webmodule's configuration holds the PersistentUnitGBean, but the part I quoted with bracket above are not the same. That prevents the code to search the default PersistentUnitGBean. In my initial mind, these parts should be the same. And actually, I output all the configurations and its sub-gbeans when server starts up. They are the same, not sure why they are different here. Please point out any mistake if I had made, ^_^ > 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.