[JIRA] (HHH-16069) Skip CDI for Hibernate extensions by default
by Steve Ebersole (JIRA)
Steve Ebersole ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *updated* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZjA5NWFmZWIz... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-16069?atlOrigin=eyJpIjoiZjA5NW... ) HHH-16069 ( https://hibernate.atlassian.net/browse/HHH-16069?atlOrigin=eyJpIjoiZjA5NW... ) Skip CDI for Hibernate extensions by default ( https://hibernate.atlassian.net/browse/HHH-16069?atlOrigin=eyJpIjoiZjA5NW... )
Change By: Steve Ebersole ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... )
By default, only look into CDI to resolve converters and listeners.
By default, skip looking into CDI for Hibernate extensions. To enable looking into CDI for Hibernate extensions, set {{hibernate.cdi.extensions}}
----
[https://groups.google.com/d/msgid/wildfly/ba3a578f-7f42-4fda-8736-9fb95c9... exception “org.hibernate.resource.beans.container.internal.NotYetReadyException: CDI BeanManager not (yet) ready to use" being thrown during the second 2-phase bootstrap deployment which is too early.
Please defer the org.hibernate.mapping.BasicValue.setExplicitCustomType() processing until later.
Paste of the exception from the above linked user report:
“
7:08:49,386 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 80) 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.jbos...@27.0.1.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:199)
at org.jbos...@27.0.1.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:129)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at org.wildfly.secu...@2.0.0.Final//org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:664)
at org.jbos...@27.0.1.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:214)
at org.jbos...@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jbos...@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.hi...@6.1.5.Final//org.hibernate.resource.beans.container.internal.JpaCompliantLifecycleStrategy$NamedBeanImpl.initialize(JpaCompliantLifecycleStrategy.java:231)
at org.hi...@6.1.5.Final//org.hibernate.resource.beans.container.internal.CdiBeanContainerExtendedAccessImpl$NamedBeanImpl.initialize(CdiBeanContainerExtendedAccessImpl.java:165)
at org.hi...@6.1.5.Final//org.hibernate.resource.beans.container.internal.CdiBeanContainerExtendedAccessImpl$NamedBeanImpl.getBeanInstance(CdiBeanContainerExtendedAccessImpl.java:172)
at org.hi...@6.1.5.Final//org.hibernate.resource.beans.internal.ManagedBeanRegistryImpl$ContainedBeanManagedBeanAdapter.getBeanInstance(ManagedBeanRegistryImpl.java:155)
at org.hi...@6.1.5.Final//org.hibernate.mapping.BasicValue.setExplicitCustomType(BasicValue.java:828)
at org.hi...@6.1.5.Final//org.hibernate.cfg.annotations.BasicValueBinder.fillSimpleValue(BasicValueBinder.java:1238)
at org.hi...@6.1.5.Final//org.hibernate.cfg.SetBasicValueTypeSecondPass.doSecondPass(SetBasicValueTypeSecondPass.java:26)
at org.hi...@6.1.5.Final//org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1782)
at org.hi...@6.1.5.Final//org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1729)
at org.hi...@6.1.5.Final//org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:300)
at org.hi...@6.1.5.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1350)
at org.hi...@6.1.5.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1421)
at org.hibernate.ji...@27.0.1.Final//org.jboss.as.jpa.hibernate.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:45)
at org.jbos...@27.0.1.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:171)
... 10 more
Caused by: java.lang.NullPointerException: Cannot invoke "jakarta.enterprise.inject.spi.BeanManager.createCreationalContext(jakarta.enterprise.context.spi.Contextual)" because "this.beanManager" is null
at org.hi...@6.1.5.Final//org.hibernate.resource.beans.container.internal.JpaCompliantLifecycleStrategy$NamedBeanImpl.initialize(JpaCompliantLifecycleStrategy.java:228)
”
( 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=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100214- sha1:3d33cb1 )
1 year, 7 months