Hi All, I found my dump mistake. I actually put persistence.xml in src/main/java/resources. It should be in src/main/resources. So maven does not complains when it build tomcat plugin.
Thanks bongosdude wrote: > > in my EJB module, I have created a persistence.xml as below: > <persistence-unit name="CallingCardUsersUnit" transaction-type="JTA"> > <description>CallingCardUserJPA</description> > > <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider> > <jta-data-source>callingcard_users</jta-data-source> > <class>com.mycom.services.svc.model.entity.users.User</class> > > <class>com.mycom.services.xvc.model.entity.users.UserRole</class> > <properties> > <property name="openjpa.log" value="SQL=TRACE" /> > </properties> > </persistence-unit> > </persistence> > > When I build my project using maven2 (i.e. mvn clean install), all build > succeeded except when it builds jetty/tomcat plugin with the following > error: > > How can I setup jetty/tomcat plugin plan.xml with a persistence unit that > I defined in persistence.xml? > > Please help. > > -B > > org.apache.geronimo.common.DeploymentException: Could not resolve > reference at deploy time for query > ?name=persistence/CallingCardUsersUnit#org.apache.geronimo.persistence.PersistenceUnitGBean. > No GBeans found. > at > org.apache.geronimo.persistence.builder.PersistenceContextRefBuilder.checkForGBean(PersistenceContextRefBuilder.java:205) > at > org.apache.geronimo.persistence.builder.PersistenceContextRefBuilder.buildNaming(PersistenceContextRefBuilder.java:119) > at > org.apache.geronimo.j2ee.deployment.NamingBuilderCollection.buildNaming(NamingBuilderCollection.java:53) > at > org.apache.geronimo.openejb.deployment.EjbDeploymentBuilder.addEnc(EjbDeploymentBuilder.java:321) > at > org.apache.geronimo.openejb.deployment.EjbDeploymentBuilder.buildEnc(EjbDeploymentBuilder.java:286) > 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) > > ----- B Amigo:super: -- View this message in context: http://www.nabble.com/Jetty-Tomcat-plugin-build-failed-with-persistence.xml-tp21534279s134p21575596.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.