[wildfly-dev] WildFly 10.0.0.Alpha5: NPE in org.hibernate.cache.internal.CacheDataDescriptionImpl.decode() ?

Frank Langelage frank.langelage at osnanet.de
Sun Jul 12 05:24:09 EDT 2015


Disabling the caching in persistence.xml makes the problem disappear.
Further investigations, enabling TRACE level logging on org.hibernate 
showed, that already the first cachable entity raises this problem.
At the end, the cacheable entity classes which have a composite primary 
key are the problem. Cacheable entities with a single id field do not 
raise this exception.
As already said, it worked fine with ORM 4.3.10 before so it seeems 
clear to me, that this is a hibernate bug.
I'll create a Jira for it and see what happens.


On 11.07.15 19:54, Scott Marlow wrote:
> Frank,
>
> I haven't seen this NPE yet.  We just added the Hibernate ORM upgrade 
> yesterday, thanks for the quick feedback!  If you like, you could also 
> mention this NPE issue on hibernate-dev at lists.jboss.org.  A Hibernate 
> Jira is also welcome if you can narrow down the likely cause.
>
> Have you tried setting shared-cache-mode to none?
>
> Scott
>
> shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
> On 07/11/2015 06:23 AM, Frank Langelage 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. at 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 at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>
>
>



More information about the wildfly-dev mailing list