Christian Daszenies (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=60d2f41...
) *commented* on HHH-16069 (
https://hibernate.atlassian.net/browse/HHH-16069?atlOrigin=eyJpIjoiMmQ1Zm...
)
Re: Defer handling of custom types until after deployment time (
https://hibernate.atlassian.net/browse/HHH-16069?atlOrigin=eyJpIjoiMmQ1Zm...
)
While migrating to Wildfly 27 (Java 11) I see a very similar exception:
16:26:45,480 ERROR [org.jboss.msc.service.fail] {} MSC000001: Failed to start service
jboss.persistenceunit."xxx": org.jboss.msc.service.StartException in service
jboss.persistenceunit."xxx":
org.hibernate.resource.beans.container.internal.NotYetReadyException: CDI BeanManager not
(yet) ready to use
{{ at
org.jboss.as.jpa@27.0.0.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:199)}}
{{ at
org.jboss.as.jpa@27.0.0.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:129)}}
{{ at java.base/java.security.AccessController.doPrivileged(Native Method)}}
{{ at
org.wildfly.security.elytron-base@2.0.0.Final//org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:664)}}
{{ at
org.jboss.as.jpa@27.0.0.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:214)}}
{{ at
org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)}}
{{ at
org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)}}
{{ at
org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)}}
{{ at
org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)}}
{{ at java.base/java.lang.Thread.run(Thread.java:829)}}
{{ at
org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)}}
Caused by: org.hibernate.resource.beans.container.internal.NotYetReadyException: CDI
BeanManager not (yet) ready to use
{{ at
org.hibernate@6.1.5.Final//org.hibernate.resource.beans.container.internal.JpaCompliantLifecycleStrategy$NamedBeanImpl.initialize(JpaCompliantLifecycleStrategy.java:231)}}
{{ at
org.hibernate@6.1.5.Final//org.hibernate.resource.beans.container.internal.CdiBeanContainerExtendedAccessImpl$NamedBeanImpl.initialize(CdiBeanContainerExtendedAccessImpl.java:165)}}
{{ at
org.hibernate@6.1.5.Final//org.hibernate.resource.beans.container.internal.CdiBeanContainerExtendedAccessImpl$NamedBeanImpl.getBeanInstance(CdiBeanContainerExtendedAccessImpl.java:172)}}
{{ at
org.hibernate@6.1.5.Final//org.hibernate.resource.beans.internal.ManagedBeanRegistryImpl$ContainedBeanManagedBeanAdapter.getBeanInstance(ManagedBeanRegistryImpl.java:155)}}
{{ at
org.hibernate@6.1.5.Final//org.hibernate.mapping.BasicValue.setExplicitCustomType(BasicValue.java:828)}}
{{ at
org.hibernate@6.1.5.Final//org.hibernate.cfg.annotations.BasicValueBinder.fillSimpleValue(BasicValueBinder.java:1238)}}
{{ at
org.hibernate@6.1.5.Final//org.hibernate.cfg.SetBasicValueTypeSecondPass.doSecondPass(SetBasicValueTypeSecondPass.java:26)}}
{{ at
org.hibernate@6.1.5.Final//org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1782)}}
{{ at
org.hibernate@6.1.5.Final//org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1729)}}
{{ at
org.hibernate@6.1.5.Final//org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:300)}}
{{ at
org.hibernate@6.1.5.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1350)}}
{{ at
org.hibernate@6.1.5.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1421)}}
{{ at
org.hibernate.jipijapa-hibernate6@27.0.0.Final//org.jboss.as.jpa.hibernate.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:45)}}
{{ at
org.jboss.as.jpa@27.0.0.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:171)}}
{{ ... 10 more}}
Caused by: java.lang.NullPointerException
{{ at
org.hibernate@6.1.5.Final//org.hibernate.resource.beans.container.internal.JpaCompliantLifecycleStrategy$NamedBeanImpl.initialize(JpaCompliantLifecycleStrategy.java:228)}}
Debugging at JpaCompliantLifecycleStrategy.java:228 shows that a custom type implementing
org.hibernate.usertype.UserType is being initialized. The BeanContainer in
CdiBeanContainerExtendedAccessImpl.java:165 is the DUMMY_BEAN_CONTAINER , it’s
usableBeanManager is null causes the NPE.
I’d be glad to help with testing/diagnosis, as this is currently a blocker for our
migration.
Thanks,
Christian
(
https://hibernate.atlassian.net/browse/HHH-16069#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16069#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100214- sha1:fa7bc5f )