After upgrading WildFly to latest alpha5 including the Hibernate ORM
update to 5.0.0.CR2 the persistence unit inside my ear cannot be started
anymore.
11.07. 12:17:54,698 INFO [org.jboss.as.jpa#run] WFLYJPA0010: Starting
Persistence Unit (phase 1 of 2) Service
'maj2e-langfr-dev.ear/ejb-entity.jar#maj2e-langfr-dev'
11.07. 12:17:54,954 INFO
[org.hibernate.jpa.internal.util.LogHelper#logPersistenceUnitInformation] HHH000204:
Processing PersistenceUnitInfo [
name: maj2e-langfr-dev
...]
11.07. 12:17:55,546 INFO [org.hibernate.Version#logVersion] HHH000412:
Hibernate Core {5.0.0.CR2}
11.07. 12:17:55,552 INFO [org.hibernate.cfg.Environment#<clinit>]
HHH000206: hibernate.properties not found
11.07. 12:17:55,562 INFO
[org.hibernate.cfg.Environment#buildBytecodeProvider] HHH000021:
Bytecode provider name : javassist
11.07. 12:17:55,701 INFO [org.hibernate.orm.deprecation#<init>]
HHH90000001: Found usage of deprecated setting for specifying Scanner
[hibernate.ejb.resource_scanner]; use [hibernate.archive.scanner] instead
11.07. 12:17:55,761 INFO
[org.hibernate.annotations.common.Version#<clinit>] HCANN000001:
Hibernate Commons Annotations {5.0.0.Final}
11.07. 12:17:55,877 INFO [org.jboss.weld.deployer#deploy] WFLYWELD0003:
Processing weld deployment ejb-session-core.jar
11.07. 12:17:55,940 INFO [org.jboss.weld.deployer#deploy] WFLYWELD0006:
Starting Services for CDI deployment: maj2e-langfr-dev.ear
11.07. 12:17:56,447 INFO [org.jboss.weld.Version#<clinit>] WELD-000900:
2.3.0 (Beta2)
11.07. 12:18:14,049 INFO [org.jboss.weld.deployer#start] WFLYWELD0009:
Starting weld service for deployment maj2e-langfr-dev.ear
[GC (Allocation Failure) [PSYoungGen: 475136K->58002K(573440K)]
560180K->143054K(1974272K), 0.4947124 secs] [Times: user=0.80 sys=0.04,
real=0.49 secs]
11.07. 12:18:18,028 INFO [org.jboss.as.jpa#run] WFLYJPA0010: Starting
Persistence Unit (phase 2 of 2) Service
'maj2e-langfr-dev.ear/ejb-entity.jar#maj2e-langfr-dev'
11.07. 12:18:19,201 INFO [org.hibernate.dialect.Dialect#<init>]
HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect
11.07. 12:18:19,521 INFO
[org.hibernate.envers.boot.internal.EnversServiceImpl#configure] Envers
integration enabled? : true
[GC (Allocation Failure) [PSYoungGen: 537234K->50463K(581632K)]
622286K->135516K(1982464K), 0.4342550 secs] [Times: user=0.80 sys=0.00,
real=0.43 secs]
11.07. 12:18:36,361 ERROR [org.jboss.msc.service.fail#failed] MSC000001:
Failed to start service
jboss.persistenceunit."maj2e-langfr-dev.ear/ejb-entity.jar#maj2e-langfr-dev":
org.jboss.msc.service.StartException in service
jboss.persistenceunit."maj2e-langfr-dev.ear/ejb-entity.jar#maj2e-langfr-dev":
javax.persistence.PersistenceException: [PersistenceUnit:
maj2e-langfr-dev] Unable to build Hibernate SessionFactory
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172)
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117)
at
org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:666)
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit:
maj2e-langfr-dev] Unable to build Hibernate SessionFactory
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:877)
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:805)
at
org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154)
... 7 more
Caused by: java.lang.NullPointerException
at
org.hibernate.cache.internal.CacheDataDescriptionImpl.decode(CacheDataDescriptionImpl.java:77)
at
org.hibernate.internal.SessionFactoryImpl.determineEntityRegionAccessStrategy(SessionFactoryImpl.java:628)
at
org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:330)
at
org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:802)
... 9 more
My persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence
xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<persistence-unit name="@MBI_DBNAME@"
transaction-type="JTA">
<jta-data-source>java:jboss/datasources/@MBI_DBNAME@</jta-data-source>
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
<validation-mode>NONE</validation-mode>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.@HIBERNATE_DIALECT@"/>
<!--
used values are
"org.hibernate.dialect.Oracle10gDialect"
"org.hibernate.dialect.InformixDialect"
-->
<property name="hibernate.show_sql"
value="@SHOW_SQL@"/>
<property name="hibernate.format_sql"
value="@SHOW_SQL@"/>
<property name="hibernate.use_sql_comments"
value="@SHOW_SQL@"/>
</properties>
</persistence-unit>
</persistence>