Re: Jetty/Tomcat plugin build failed with persistence.xml
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 descriptionCallingCardUserJPA/description providerorg.apache.openjpa.persistence.PersistenceProviderImpl/provider jta-data-sourcecallingcard_users/jta-data-source classcom.mycom.services.svc.model.entity.users.User/class classcom.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.
Re: Jetty/Tomcat plugin build failed with persistence.xml
really not have transactions enabled. thanks david jencks On Jan 18, 2009, at 2:52 PM, bongosdude wrote: in my EJB module, I have created a persistence.xml as below: persistence-unit name=CallingCardUsersUnittransaction- type=JTA descriptionCallingCardUserJPA/description providerorg.apache.openjpa.persistence.PersistenceProviderImpl/ provider jta-data-sourcecallingcard_users/jta-data-source classcom.mycom.services.svc.model.entity.users.User/class classcom.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-tp21534279s134p21534279.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. - B Amigo:super: -- View this message in context: http://www.nabble.com/Jetty-Tomcat-plugin-build-failed-with-persistence.xml-tp21534279s134p21535950.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. - B Amigo:super: -- View this message in context: http://www.nabble.com/Jetty-Tomcat-plugin-build-failed-with-persistence.xml-tp21534279s134p21552479.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Jetty/Tomcat plugin build failed with persistence.xml
Where exactly is the persistence.xml in your ear? BTW if you use auto-create tables or openjpa sequences you almost certainly need a non-jta-datasource as well, and it should really not have transactions enabled. thanks david jencks On Jan 18, 2009, at 2:52 PM, bongosdude wrote: in my EJB module, I have created a persistence.xml as below: persistence-unit name=CallingCardUsersUnit transaction-type=JTA descriptionCallingCardUserJPA/description providerorg.apache.openjpa.persistence.PersistenceProviderImpl/ provider jta-data-sourcecallingcard_users/jta-data-source classcom.mycom.services.svc.model.entity.users.User/class classcom.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-tp21534279s134p21534279.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Jetty/Tomcat plugin build failed with persistence.xml
David, I figured out part of my problems by looking at Bank/Caculator samples. Bank tomcat/jetty plugins depend on the sample sample-datasource (sample-datasource.car). So it gave me how to create plan.xml for my datasource connector. The build was now successful but with exception as below: Can you show me how can I build gbean for my persistence unit that I defined in persistence.xml. I could not find out how it can be done with the sample bank/calculator. INFO] Started deployer: org.apache.geronimo.configs/persistence-jpa10-deployer/2.1.2/car 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) djencks wrote: Where exactly is the persistence.xml in your ear? BTW if you use auto-create tables or openjpa sequences you almost certainly need a non-jta-datasource as well, and it should really not have transactions enabled. thanks david jencks On Jan 18, 2009, at 2:52 PM, bongosdude wrote: in my EJB module, I have created a persistence.xml as below: persistence-unit name=CallingCardUsersUnittransaction-type=JTA descriptionCallingCardUserJPA/description providerorg.apache.openjpa.persistence.PersistenceProviderImpl/ provider jta-data-sourcecallingcard_users/jta-data-source classcom.mycom.services.svc.model.entity.users.User/class classcom.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-tp21534279s134p21534279.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com
Re: Jetty/Tomcat plugin build failed with persistence.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-tp21534279s134p21534279.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. - B Amigo:super: -- View this message in context: http://www.nabble.com/Jetty-Tomcat-plugin-build-failed-with-persistence.xml-tp21534279s134p21535773.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Jetty/Tomcat plugin build failed with persistence.xml
/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-tp21534279s134p21534279.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. - B Amigo:super: -- View this message in context: http://www.nabble.com/Jetty-Tomcat-plugin-build-failed-with-persistence.xml-tp21534279s134p21535950.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Jetty/Tomcat plugin build failed with persistence.xml
descriptionCallingCardUserJPA/description providerorg.apache.openjpa.persistence.PersistenceProviderImpl/ provider jta-data-sourcecallingcard_users/jta-data-source classcom.mycom.services.svc.model.entity.users.User/class classcom.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-tp21534279s134p21534279.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. - B Amigo:super: -- View this message in context: http://www.nabble.com/Jetty-Tomcat-plugin-build-failed-with-persistence.xml-tp21534279s134p21535950.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.