geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Collins <Russell.Coll...@mclaneat.com>
Subject Hibernate Deployment on Geronimo 2.1.4
Date Tue, 19 May 2009 04:05:56 GMT

I am trying to deploy on Geronimo 2.1.4 using hibernate as my JPA provider. Here is my persistence
file.

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
      <persistence-unit name="domain.ecommerce" transaction-type="JTA">
            <description>eCommerce Domain Model</description>
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
            <jta-data-source>EMDS_DB</jta-data-source>

            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"
/>
            <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.JTATransactionFactory"
/>
            <property name="hibernate.transaction.manager_lookup_class" value="org.apache.geronimo.hibernate.transaction.GeronimoTransactionManagerLookup"/>
            <class>com.mds.domain.ecommerce.entity.Admin</class>
            <class>com.mds.domain.ecommerce.entity.User</class>
            <class>com.mds.domain.ecommerce.entity.BusinessType</class>
            <class>com.mds.domain.ecommerce.embedded.EntityChange</class>
            <class>com.mds.domain.ecommerce.embedded.EntityStatus</class>
            <class>com.mds.domain.ecommerce.entity.SystemValues</class>
            <class>com.mds.domain.ecommerce.keys.PkSystemValues</class>
            <exclude-unlisted-classes>true</exclude-unlisted-classes>

      </persistence-unit>
</persistence>

I created the Geronimo transaction manager lookup class.  Here is what my deployment plan
looks like

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<app:application xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0"
xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2" xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2"
xmlns:pers="http://java.sun.com/xml/ns/persistence" xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
application-name="ecommerce">
    <dep:environment>
        <dep:moduleId>
            <dep:groupId>mds</dep:groupId>
            <dep:artifactId>ecommerce</dep:artifactId>
            <dep:version>2.0</dep:version>
            <dep:type>car</dep:type>
        </dep:moduleId>
        <dep:dependencies>
            <dep:dependency>
                  <dep:groupId>console.dbpool</dep:groupId>
                  <dep:artifactId>EMDS_DB</dep:artifactId>
                  <dep:version>1.0</dep:version>
                  <dep:type>rar</dep:type>
            </dep:dependency>
            <dep:dependency>
                  <groupId>org.apache.geronimo</groupId>
                  <artifactId>GeronimoTransactionManager</artifactId>
                  <version>1.0</version>
                  <type>jar</type>
            </dep:dependency>
        </dep:dependencies>
    </dep:environment>
</app:application>



This is the error that I am getting:   I have tried adding and removing the JTATransactionFactory
entries and nothing helps.


2009-05-18 22:50:30,567 ERROR [GBeanInstanceState] Error while starting; GBean is now in the
FAILED state: abstractName="mds/ecommerce/2.0/car?EJBModule=mds.ecommerce.base.jar,J2EEApplication=mds/ecommerce/2.0/car,PersistenceUnitModule=domain.ecommerce.jar,j2eeType=PersistenceUnit,name=domain.ecommerce"
javax.persistence.PersistenceException: [PersistenceUnit: domain.ecommerce] Unable to build
EntityManagerFactory
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
      at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
      at org.apache.geronimo.persistence.PersistenceUnitGBean.<init>(PersistenceUnitGBean.java:127)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555)
      at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
      at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
      at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:544)
      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:597)
      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.kernel.KernelGBean.invoke(KernelGBean.java:342)
      at sun.reflect.GeneratedMethodAccessor178.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      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.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
      at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
      at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
      at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366)
      at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
      at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
      at sun.rmi.transport.Transport$1.run(Transport.java:159)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
Caused by: org.hibernate.HibernateException: The chosen transaction strategy requires access
to the JTA TransactionManager
      at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:361)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
      at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
      ... 54 more


Any guidence you could give me would be greatly appreciated.



Mime
View raw message