When I am using Hibernate 5 with the DB2 column definition XML and I try to persist a entity class into the database I get the following error: javax.ejb.EJBTransactionRolledbackException: nested exception is: javax.ejb.EJBException: CWNEN0030E: The server was unable to obtain an object instance for the java:comp/env/XXX/em reference. The exception message was: javax.persistence.PersistenceException: [PersistenceUnit: XXX] Unable to build Hibernate SessionFactory; nested exception is: java.lang.RuntimeException: javax.persistence.PersistenceException: [PersistenceUnit: XXX] Unable to build Hibernate SessionFactory at com.ibm.ejs.container.BusinessExceptionMappingStrategy.mapCSIException(BusinessExceptionMappingStrategy.java:152) at com.ibm.ejs.container.BusinessExceptionMappingStrategy.mapCSITransactionRolledBackException(BusinessExceptionMappingStrategy.java:613) at com.ibm.ejs.container.EJSDeployedSupport.mapCSITransactionRolledBackException(EJSDeployedSupport.java:602) at com.ibm.ejs.container.EJSContainer.postInvokeRolledbackException(EJSContainer.java:4382) at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4073) at sun.reflect.GeneratedMethodAccessor211.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:508) at com.ibm.ejs.container.TimedObjectWrapper.invokeCallback(TimedObjectWrapper.java:103) at com.ibm.ejs.container.TimerNpRunnable.doWork(TimerNpRunnable.java:184) at com.ibm.ejs.container.TimerNpRunnable.run(TimerNpRunnable.java:91) at com.ibm.ejs.container.TimerNpAlarmListener.fired(TimerNpAlarmListener.java:102) at com.ibm.ws.asynchbeans.AlarmImpl.callListenerMethod(AlarmImpl.java:402) at com.ibm.ws.asynchbeans.timer.GenericTimer.run(GenericTimer.java:229) at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:277) at java.security.AccessController.doPrivileged(AccessController.java:664) at javax.security.auth.Subject.doAs(Subject.java:488) at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:133) at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:91) at com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:348) at java.security.AccessController.doPrivileged(AccessController.java:694) at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:1042) at com.ibm.ws.asynchbeans.AlarmImpl.runListenerAsCJWork(AlarmImpl.java:234) at com.ibm.ws.asynchbeans.am._Alarm.fireAlarm(_Alarm.java:340) at com.ibm.ws.asynchbeans.am._Alarm.run(_Alarm.java:237) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909) Caused by: javax.ejb.EJBException: CWNEN0030E: The server was unable to obtain an object instance for the java:comp/env/XXX/em reference. The exception message was: javax.persistence.PersistenceException: [PersistenceUnit: XXX] Unable to build Hibernate SessionFactory; nested exception is: java.lang.RuntimeException: javax.persistence.PersistenceException: [PersistenceUnit: XXX] Unable to build Hibernate SessionFactory at com.ibm.ejs.container.util.ExceptionUtil.EJBException(ExceptionUtil.java:503) at com.ibm.ejs.container.ManagedBeanOBase.injectInstance(ManagedBeanOBase.java:154) at com.ibm.ejs.container.StatelessBeanO.injectInstance(StatelessBeanO.java:295) at com.ibm.ejs.container.StatelessBeanO.initialize(StatelessBeanO.java:169) at com.ibm.ejs.container.BeanOFactory.create(BeanOFactory.java:105) at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:976) at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1078) at com.ibm.ejs.container.activator.UncachedActivationStrategy.atActivate(UncachedActivationStrategy.java:63) at com.ibm.ejs.container.activator.Activator.preInvokeActivateBean(Activator.java:264) at com.ibm.ejs.container.EJSContainer.preInvokeActivate(EJSContainer.java:3239) at com.ibm.ejs.container.EJSContainer.EjbPreInvoke(EJSContainer.java:2576) ... 23 common frames omitted Caused by: java.lang.RuntimeException: javax.persistence.PersistenceException: [PersistenceUnit: XXX] Unable to build Hibernate SessionFactory at com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerFactory(JPAPUnitInfo.java:1028) at com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerPool(JPAPUnitInfo.java:1253) at com.ibm.ws.jpa.management.JPATxEntityManager.<init>(JPATxEntityManager.java:188) at com.ibm.ws.jpa.container.v21.JPATxEntityManagerV21.<init>(JPATxEntityManagerV21.java:69) at com.ibm.ws.jpa.runtime.JPA21Runtime.createJPATxEntityManager(JPA21Runtime.java:133) at com.ibm.ws.jpa.management.AbstractJPAComponent.getEntityManager(AbstractJPAComponent.java:299) at com.ibm.ws.util.JPAJndiLookupObjectFactory.getObjectInstance(JPAJndiLookupObjectFactory.java:177) at com.ibm.wsspi.injectionengine.InjectionBinding.getInjectionObjectInstance(InjectionBinding.java:1556) at com.ibm.wsspi.injectionengine.InjectionBinding.getInjectionObject(InjectionBinding.java:1433) at com.ibm.wsspi.injectionengine.InjectionBinding.getInjectableObject(InjectionBinding.java:1373) at com.ibm.wsspi.injectionengine.InjectionTarget.inject(InjectionTarget.java:108) at com.ibm.ws.injectionengine.AbstractInjectionEngine.inject(AbstractInjectionEngine.java:852) at com.ibm.ejs.container.ManagedBeanOBase.injectInstance(ManagedBeanOBase.java:148) ... 32 common frames omitted Caused by: javax.persistence.PersistenceException: [PersistenceUnit: XXX] Unable to build Hibernate SessionFactory at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1016) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:942) at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:149) at com.ibm.ws.jpa.management.JPAPUnitInfo.createEMFactory(JPAPUnitInfo.java:1161) at com.ibm.ws.jpa.management.JPAPUnitInfo.initialize(JPAPUnitInfo.java:984) at com.ibm.ws.jpa.management.JPAPxmlInfo.extractPersistenceUnits(JPAPxmlInfo.java:240) at com.ibm.ws.jpa.management.JPAScopeInfo.processPersistenceUnit(JPAScopeInfo.java:115) at com.ibm.ws.jpa.management.JPAApplInfo.addPersistenceUnits(JPAApplInfo.java:147) at com.ibm.ws.jpa.management.SharedJPAComponentImpl.startingModule(SharedJPAComponentImpl.java:322) at com.ibm.ws.jpa.management.JPAComponentImpl.startingDeployedModule(JPAComponentImpl.java:786) at com.ibm.ws.jpa.management.JPAComponentImpl.startingDeployedApplication(JPAComponentImpl.java:636) at com.ibm.ws.jpa.management.JPAComponentImpl.stateChanged(JPAComponentImpl.java:551) at com.ibm.ws.runtime.component.ApplicationMgrImpl$ComparableDeployedObjectListener.stateChanged(ApplicationMgrImpl.java:2650) at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:1177) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:1497) at com.ibm.ws.runtime.component.DeployedApplicationImpl.setState(DeployedApplicationImpl.java:310) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:1087) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:799) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1449) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2309) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436) at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:654) at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5556) at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5682) at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:668) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:612) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1339) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:508) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:83) at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:508) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:287) at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1263) at java.security.AccessController.doPrivileged(AccessController.java:664) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:91) at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1257) at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1096) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:831) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:813) at com.ibm.ws390.management.connector.corba.CorbaConnectorImpl.invoke(CorbaConnectorImpl.java:1073) at com.ibm.ws390.management.connector.corba._CorbaConnectorImplBase._invoke(_CorbaConnectorImplBase.java:416) at com.ibm.ws390.orb.CommonBridge.invoke(CommonBridge.java:1898) at com.ibm.ws390.orb.CommonBridge.getAndProcessWork(CommonBridge.java:725) at com.ibm.ws390.orb.CommonBridge.runApplicationThread(CommonBridge.java:614) at com.ibm.ws.util.ThreadPool$ZOSWorker.run(ThreadPool.java:2144) Caused by: org.hibernate.MappingException: Could not determine type for: org.hibernate.dialect.DB2390Dialect, at table: XXX, for columns: [org.hibernate.mapping.Column(XML)] at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:486) at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:453) at org.hibernate.mapping.Property.isValid(Property.java:226) at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:624) at org.hibernate.mapping.RootClass.validate(RootClass.java:267) at org.hibernate.boot.internal.MetadataImpl.validate(MetadataImpl.java:347) at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:466) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:939) ... 51 common frames omitted |