Setting the provider element to the value you suggested makes it even worse:
Caused by: javax.persistence.PersistenceException: WFLYJPA0057:
PersistenceProvider 'org.hibernate.ejb.HibernatePersistence' not found
at
org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.lookupProvider(PersistenceUnitServiceHandler.java:1006)
at
org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.nextPhaseDependsOnPersistenceUnit(PersistenceUnitServiceHandler.java:1045)
at
org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:135)
at
org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:52)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)
... 5 more
I added instead this
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
but this doe not change anything. Same NPE as I had before.
No, I do not have hibernate jar in my pom.xml, I not aven have a pom.xml
file because I'm using ant for build. ;-)
I do not provide my own hibernate version, I just try the use the
version 5.0.0.CR2 delivered by WildFly now. With the hibernate version
4.3.10 used until the day before yesterday everything was fine.
So it's something related to the hibernate update. Either it's not yet
complete, but how did the testsuite run successful then, or a change to
persistence.xml or else is needed.
On 11.07.15 14:37, Eduardo Sant'Ana da Silva wrote:
Maybe something related to your persistence provider.
The error seems to be here:
>>>EntityManagerFactoryBuilder emfBuilder =
phaseOnePersistenceUnitService.getEntityManagerFactoryBuilder();
I'm not sure about the following, is just a hint...
Could you try add this line?
<provider>org.hibernate.ejb.HibernatePersistence</provider>
Is the hibernate-entitymanager-<VERSION>.jar on your pom.xml?
Are you using jboss-deployment-structures.xml file? Could you provide it?
Eduardo Sant'Ana da Silva
On Jul 11, 2015, at 7:23 AM, Frank Langelage
<frank.langelage(a)osnanet.de <mailto:frank.langelage@osnanet.de>> wrote:
> 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>
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev(a)lists.jboss.org <mailto:wildfly-dev@lists.jboss.org>
>
https://lists.jboss.org/mailman/listinfo/wildfly-dev