Errors when migrating from jboss 7x to wildfly 9
magick93 Dec 28, 2015 11:07 AMHello
I am trying to upgrade our Errai app to run on Wildfly.
I am getting hibernate errors, displayed below. Does anyone know how to fix this?
appui-dev-local | 15:53:53,211 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 72) HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL9Dialect
appui-dev-local | 15:53:53,217 INFO [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (ServerService Thread Pool -- 72) HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
appui-dev-local | 15:53:53,385 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 72) HHH000397: Using ASTQueryTranslatorFactory
appui-dev-local | 15:53:53,385 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 73) HHH000397: Using ASTQueryTranslatorFactory
appui-dev-local | 15:53:53,761 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 73) MSC000001: Failed to start service jboss.persistenceunit."app.ui.war#pu-magick2": org.jboss.msc.service.StartException in service jboss.persistenceunit."app.ui.war#pu-magick2": java.lang.NoClassDefFoundError: org/hibernate/service/classloading/spi/ClassLoaderService
appui-dev-local | at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172)
appui-dev-local | at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117)
appui-dev-local | at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:665)
appui-dev-local | at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182)
appui-dev-local | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
appui-dev-local | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
appui-dev-local | at java.lang.Thread.run(Thread.java:745)
appui-dev-local | at org.jboss.threads.JBossThread.run(JBossThread.java:320)
appui-dev-local | Caused by: java.lang.NoClassDefFoundError: org/hibernate/service/classloading/spi/ClassLoaderService
appui-dev-local | at org.hibernate.envers.event.EnversIntegrator.integrate(EnversIntegrator.java:64)
appui-dev-local | at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:312)
appui-dev-local | at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859)
appui-dev-local | at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:857)
appui-dev-local | at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)
appui-dev-local | at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:425)
appui-dev-local | at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:849)
appui-dev-local | at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
appui-dev-local | at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154)
appui-dev-local | ... 7 more
Persistence.xml
<persistence 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_2_0.xsd"
version="2.0">
<persistence-unit name="pu-magick" transaction-type="JTA">
<!-- <provider>org.hibernate.ejb.HibernatePersistence</provider> -->
<jta-data-source>java:jboss/datasources/magick</jta-data-source>
<class>com.my.models.shared.User</class>
<class>com.my.models.shared.Broker</class>
<class>com.my.models.shared.BrokerServer</class>
<class>com.my.models.shared.TraderAccount</class>
<class>com.my.models.shared.Strategy</class>
<class>com.my.models.shared.Rule</class>
<class>com.my.models.shared.DataFeed</class>
<class>com.my.models.shared.TraderDataFeed</class>
<class>com.my.models.shared.Symbol</class>
<class>com.my.models.shared.Role</class>
<class>com.my.models.shared.UserRequest</class>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="org.hibernate.envers.auditTableSuffix" value="_versions" />
<property name="org.hibernate.envers.revisionFieldName" value="_revision" />
<property name="org.hibernate.envers.revisionTypeFieldName" value="_rev_type" />
</properties>
</persistence-unit>
</persistence>