Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 42129 invoked from network); 31 Mar 2008 21:24:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Mar 2008 21:24:59 -0000 Received: (qmail 18519 invoked by uid 500); 31 Mar 2008 21:24:48 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 18488 invoked by uid 500); 31 Mar 2008 21:24:48 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 18460 invoked by uid 99); 31 Mar 2008 21:24:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 14:24:48 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of luowp88@hotmail.com designates 65.54.246.98 as permitted sender) Received: from [65.54.246.98] (HELO bay0-omc1-s26.bay0.hotmail.com) (65.54.246.98) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 21:24:05 +0000 Received: from BAY114-W5 ([65.54.169.105]) by bay0-omc1-s26.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 31 Mar 2008 14:24:17 -0700 Message-ID: X-Originating-IP: [209.90.158.141] From: "WEIPING (BILL) LUO" To: Subject: RE: Persistence unit deploy error in 2.1 but works in 2.02 Date: Mon, 31 Mar 2008 17:24:17 -0400 Importance: Normal In-Reply-To: <5B6A1E91-853A-4C20-9715-A90251BB4CA3@yahoo.com> References: <16396504.post@talk.nabble.com> <5B6A1E91-853A-4C20-9715-A90251BB4CA3@yahoo.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 31 Mar 2008 21:24:17.0443 (UTC) FILETIME=[9374EF30:01C89375] X-Virus-Checked: Checked by ClamAV on apache.org Thanks! I am not sure which name should I use. So I tried use the db-pool name and = jdbc/cmwsDS. Geronimo can not deploy it and throw out=20 Unable to resolve reference "JtaDataSourceWrapper" in gbean inpulse8/ContentManagementWorkflow/1.0.0/war?J2EEApplication= =3Dnull,PersistenceUnitModule=3DWEB-INF/classes/,WebModule=3Dinpulse8/Conte= ntManagementWorkflow/1.0.0/war,j2eeType=3DPersistenceUnit,name=3DContentMan= agementWorkflow to a gbean matching the pattern [?name=3Djava:/inpulse_cmws#org.apache.= geronimo.naming.ResourceSource] due to: No matches for referencePatterns: [?name=3Djava:/inpulse_cmws#o= rg.apache.geronimo.naming.ResourceSource] org.apache.geronimo.common.DeploymentException: Unable to resolve reference= "JtaDataSourceWrapper" in gbean inpulse8/ContentManagementWorkflow/1.0.0/war?J2EEApplication= =3Dnull,PersistenceUnitModule=3DWEB-INF/classes/,WebModule=3Dinpulse8/Conte= ntManagementWorkflow/1.0.0/war,j2eeType=3DPersistenceUnit,name=3DContentMan= agementWorkflow to a gbean matching the pattern [?name=3Djava:/inpulse_cmws#org.apache.= geronimo.naming.ResourceSource] due to: No matches for referencePatterns: [?name=3Djava:/inpulse_cmws#o= rg.apache.geronimo.naming.ResourceSource] at org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(D= eploymentContext.java:516) at org.apache.geronimo.deployment.Deployer.install(Deployer.java:319) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:256) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja= va:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso= rImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(Reflec= tionMethodInvoker.java:34) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.= java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.ja= va:867) at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:23= 9) at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDep= loy(AbstractDeployCommand.java:116) at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(Distr= ibuteCommand.java:61) at java.lang.Thread.run(Thread.java:619) So is there any document to discuss about how to set it without JNDI?=20 Regards, Bill ---------------------------------------- > From: david_jencks@yahoo.com > Subject: Re: Persistence unit deploy error in 2.1 but works in 2.02 > Date: Mon, 31 Mar 2008 13:37:58 -0700 > To: user@geronimo.apache.org >=20 > It's generally considered more polite to continue the original thread =20 > you start, answering requests for more information, rather than to =20 > appear to ignore responses and start new threads on the same topic. > In this case I realize you may be having problems with your mail =20 > provider. > On Mar 31, 2008, at 1:25 PM, luoluo wrote: >=20 >> >> Hi, >> >> I have an application using JPA with hibernate. I changed the =20 >> persistence >> provider to hibernate and trying to using db-pools. It works =20 >> perfectly fine >> in Geronimo 2.02. But when I tried to deploy it to Geronimo 2.1. It =20 >> throw >> out an exception with can not find JNDI entry for the data source when >> Geronimo try to start the application. >> >> in persistence.xml, I use below to refer the data source: >> >>=20 >> org.hibernate.ejb.HibernatePersistence >> =09 >> > value=3D"class" /> >> >> > value=3D"java:/comp/env/jdbc/CmwsDS" /> >> ... >> >> The data source is created and defined in web.xml too. >> >> I found the different between 2.0.2 and 2.1. In 2.0.2, the entity =20 >> manager >> was initialized when first time db-access. At that time, the data =20 >> source is >> already be registered in JNDI as /comp/env/jdbc/...DS. >> >> In 2.1, Geronimo try to initialize the entity manager when starting =20 >> the >> application. The sequence is wrong. It tried to find the data =20 >> source before >> the reference in Web.xml been registered. So the JNDI entry not find >> exception was thrown out. >> >> Is that a bug of Geronimo 2.1? Is there any way to work around this =20 >> issue in >> 2.1? >=20 > I recommend you use the jpa standard way of specifying datasources =20 > for jpa (using the jta-datasource and non-jta-datasource elements) =20 > rather than this hibernate specific way using a hibernate specific =20 > property. Since in geronimo the jpa standard way does not rely on =20 > jndi, you will not have this problem. >=20 > Can you provide a stack trace of the problem you are seeing? That =20 > would help figure out what is causing the earlier initialization. >=20 > thanks > david jencks >=20 >> >> Thanks! >> >> Bill >> >> --=20 >> View this message in context: http://www.nabble.com/Persistence-=20 >> unit-deploy-error-in-2.1-but-works-in-2.02-=20 >> tp16396504s134p16396504.html >> Sent from the Apache Geronimo - Users mailing list archive at =20 >> Nabble.com. >> >=20