IterableBridge throws LazyInitializationException when Hibernate.initialize(..) not utilized

Description

I have a deep object tree that will throw an LazyInitializationException (org.hibernate.search.bridge.BridgeException: Exception while calling bridge#set) when saving an entity with an instance variable / field annotated with BuiltinIterableBridge that has not been initialized. This is unexpected.

@ElementCollection @CollectionTable( name = "site_notes", joinColumns = @JoinColumn(name = "site_id", foreignKey = @ForeignKey(name = "fk_site_notes__01")) ) @org.hibernate.annotations.ForeignKey(name = "none") // https://stackoverflow.com/questions/41729709/how-do-i-disable-hibernate-foreign-key-constraint-on-a-bidirectional-association @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO) @FieldBridge(impl = BuiltinIterableBridge.class) protected List<String> siteNotes = new LinkedList<>();

The LazyInitializationException is thrown in the parent IterableBridge class on line 48.

46: private void indexNotNullIterable(String name, Object value, Document document, LuceneOptions luceneOptions) { 47: Iterable<?> collection = (Iterable<?>) value; 48: for ( Object entry : collection ) { 49: indexEntry( name, entry, document, luceneOptions ); 50: } 51: }

Workaround

Initialize all Hibernate Search instance variables / fields with the Hibernate.initialize(..) preceding an entity save.

Activity

Yoann RodièreSeptember 20, 2018 at 6:44 AM

Thanks you for your feedback. Since this is not an issue with Hibernate, but rather with how it's used, I will close this ticket.

In order to make Hibernate Search easier to use and to reduce the impact of this problem, I opened two tickets for Hibernate Search 6:

Mark SSeptember 19, 2018 at 8:46 PM
Edited

Thanks for the great documentation/comments, they were very helpful and greatly appreciated.

For now, to maintain data consistency between my entities and Hibernate Search, I will refrain from utilizing flush(), clear() or flushToIndexes() and try to batch my updates utilizing multiple transactions verses a single big transaction.

Yoann RodièreSeptember 13, 2018 at 6:29 AM

I forgot: this can also happen if you cleared your session without flushing to the indexes first. Which is also a mistake, because it effectively detaches all entities from the session, which means Hibernate Search won't be able to access lazily loaded data anymore. In the <make changes>; flush(); clear(); <repeat> pattern, you should always perform a FullTextSession.flushToIndexes() before the clear(). However, it has the side effect of making your transaction leaky, in the sense if the transaction is rolled back, the index changes will not. A safer solution is to open one transaction per batch.

See this stackoverflow answer for more information. In particular:

The first, perhaps more correct, solution, would be for you to not use a single, big transaction, but multiple smaller ones. For example create a transaction for each chunk of 200 elements. Of course this means if a chunk fails, the previous chunks will still be in the database, but in many cases this might not matter, as you can just restart from where you failed, and the index would still be in sync with the database.

Spring gives you control over transactions using transaction templates, so you can manually start a new transaction for each chunk of 200 elements, or just refactor your code to put the @Transactional annotation at the right place. [There should be similar features in Java EE, I just don't know about them out of the top of my head.]

The second solution would be for you to still use a single, big transaction, but during the transaction periodically flush your changes, both to the database (which would be able to rollback the changes later if the transaction is aborted, don't worry) and to the index (which would not be able to rollback the changes later). This means in particular that if the transaction fails, you would have to restart everything and purge the index, because it would not be in sync with the database (which rolled back the changes) anymore.

You can find an example using periodic flushing in the documentation: https://docs.jboss.org/hibernate/search/5.10/reference/en-US/html_single/#search-batchindex-flushtoindexes

If you adapt the example, your code will look more or less like this:

// Execute the code below inside a transaction Session session = ...; FullTextSession fullTextSession = Search.getFullTextSession( session ); int index = 0; while(results.next()) { index++; // TODO: add code here to insert one row if (index % BATCH_SIZE == 0) { session.flush(); //apply changes to the database fullTextSession.flushToIndexes(); //apply changes to indexes fullTextSession.clear(); //free memory since the queue is processed } }

Yoann RodièreSeptember 13, 2018 at 6:20 AM
Edited

It seems your problem happens during PostTransactionWorkQueueSynchronization.beforeCompletion, which means proxies should still have a session.

Except... if you used entities from another session, or serialized/deserialized entities, without first attaching them explicitly to the new session. If you did that, then it's not a bug in Hibernate Search, it's just a bug in either Hibernate ORM or in your application: Hibernate Search cannot possibly detect that an entity comes from another session and decide to re-attach it to the new session for you. Even Hibernate ORM does not!

I'd recommend checking where that particular entity comes from and ensuring it is correctly attached to the session before it is added to your main (indexed) entity. If that solves the issue, then we can close this ticket.

See the section about working with detached data in the Hibernate ORM documentation.

Mark SSeptember 12, 2018 at 4:09 PM
Edited

I had a quick look at the test case template and even created my own test case though I have been unable to reproduce. In the situation I described above I am utilizing Wildfly / JEE container-managed transactions (@Transactional(value=TxType.REQUIRES_NEW)) which could be the contributing factor.

Eclipse Debug Stacktrace of LazyInitializationException -

org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:147) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:260) at org.hibernate.search.hcore.util.impl.HibernateHelper.unproxy(HibernateHelper.java:49) at org.hibernate.search.engine.impl.HibernateStatelessInitializer.unproxy(HibernateStatelessInitializer.java:39) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.unproxy(DocumentBuilderIndexedEntity.java:878) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.buildDocumentFields(DocumentBuilderIndexedEntity.java:413) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.buildDocumentFieldsForEmbeddedObjects(DocumentBuilderIndexedEntity.java:523) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.buildDocumentFields(DocumentBuilderIndexedEntity.java:432) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.getDocument(DocumentBuilderIndexedEntity.java:354) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.createAddWork(DocumentBuilderIndexedEntity.java:256) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.addWorkToQueue(DocumentBuilderIndexedEntity.java:198) at org.hibernate.search.engine.impl.WorkPlan$PerEntityWork.enqueueLuceneWork(WorkPlan.java:521) at org.hibernate.search.engine.impl.WorkPlan$PerClassWork.enqueueLuceneWork(WorkPlan.java:283) at org.hibernate.search.engine.impl.WorkPlan.getPlannedLuceneWork(WorkPlan.java:155) at org.hibernate.search.backend.impl.WorkQueue.prepareWorkPlan(WorkQueue.java:114) at org.hibernate.search.backend.impl.BatchedQueueingProcessor.prepareWorks(BatchedQueueingProcessor.java:55) at org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization.beforeCompletion(PostTransactionWorkQueueSynchronization.java:64) at org.hibernate.search.backend.impl.EventSourceTransactionContext$DelegateToSynchronizationOnBeforeTx.doBeforeTransactionCompletion(EventSourceTransactionContext.java:169) at org.hibernate.engine.spi.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion(ActionQueue.java:935) at org.hibernate.engine.spi.ActionQueue.beforeTransactionCompletion(ActionQueue.java:510) at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2353) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:491) at org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl.beforeCompletion(JtaTransactionCoordinatorImpl.java:316) at org.hibernate.resource.transaction.backend.jta.internal.synchronization.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:47) at org.hibernate.resource.transaction.backend.jta.internal.synchronization.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:37) at org.jboss.as.txn.service.internal.tsr.JCAOrderedLastSynchronizationList.beforeCompletion(JCAOrderedLastSynchronizationList.java:113) at org.wildfly.transaction.client.AbstractTransaction.performConsumer(AbstractTransaction.java:236) at org.wildfly.transaction.client.AbstractTransaction.performConsumer(AbstractTransaction.java:247) at org.wildfly.transaction.client.AbstractTransaction$AssociatingSynchronization.beforeCompletion(AbstractTransaction.java:292) at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:368) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:91) at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162) at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1289) at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126) at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:89) at org.wildfly.transaction.client.LocalTransaction.commitAndDissociate(LocalTransaction.java:77) at org.wildfly.transaction.client.ContextTransactionManager.commit(ContextTransactionManager.java:71) at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:88) at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:261) at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:362) at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:144) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509) at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81) at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509) at org.jboss.as.ejb3.component.singleton.ContainerManagedConcurrencyInterceptor.processInvocation(ContainerManagedConcurrencyInterceptor.java:106) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438) at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:619) at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53) at org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99) at org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:109) at org.jboss.as.ejb3.timerservice.TimerTask.invokeBeanMethod(TimerTask.java:189) at org.jboss.as.ejb3.timerservice.TimerTask.callTimeout(TimerTask.java:185) at org.jboss.as.ejb3.timerservice.TimerTask.run(TimerTask.java:159) at org.jboss.as.ejb3.timerservice.TimerServiceImpl$Task$1.run(TimerServiceImpl.java:1211) at org.wildfly.extension.requestcontroller.RequestController$QueuedTask$1.run(RequestController.java:494) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:485)

The Wildfly instance logs -

2018-09-12 14:57:05,256 ERROR [EJB default - 4] (SynchronizationRegistryStandardImpl:63) - HHH000260: Exception calling user Synchronization [org.hibernate.search.backend.impl.EventSourceTransactionContext$BeforeCommitSynchronizationDelegator@24c05e75] : org.hibernate.LazyInitializationException: could not initialize proxy - no Session 14:57:05,257 WARN [com.arjuna.ats.arjuna] (EJB default - 4) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffffc0a80232:-607477c6:5b9960fe:56, org.wildfly.transaction.client.AbstractTransaction$AssociatingSynchronization@514ee640 >: org.hibernate.resource.transaction.LocalSynchronizationException: Exception calling user Synchronization (beforeCompletion): org.hibernate.search.backend.impl.EventSourceTransactionContext$BeforeCommitSynchronizationDelegator at org.hibernate.resource.transaction.internal.SynchronizationRegistryStandardImpl.notifySynchronizationsBeforeTransactionCompletion(SynchronizationRegistryStandardImpl.java:65) at org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl.beforeCompletion(JtaTransactionCoordinatorImpl.java:327) at org.hibernate.resource.transaction.backend.jta.internal.synchronization.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:47) at org.hibernate.resource.transaction.backend.jta.internal.synchronization.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:37) at org.jboss.as.txn.service.internal.tsr.JCAOrderedLastSynchronizationList.beforeCompletion(JCAOrderedLastSynchronizationList.java:113) at org.wildfly.transaction.client.AbstractTransaction.performConsumer(AbstractTransaction.java:236) at org.wildfly.transaction.client.AbstractTransaction.performConsumer(AbstractTransaction.java:247) at org.wildfly.transaction.client.AbstractTransaction$AssociatingSynchronization.beforeCompletion(AbstractTransaction.java:292) at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:368) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:91) at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162) at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1289) at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126) at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:89) at org.wildfly.transaction.client.LocalTransaction.commitAndDissociate(LocalTransaction.java:77) at org.wildfly.transaction.client.ContextTransactionManager.commit(ContextTransactionManager.java:71) at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:88) at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:261) at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:362) at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:144) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509) at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81) at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509) at org.jboss.as.ejb3.component.singleton.ContainerManagedConcurrencyInterceptor.processInvocation(ContainerManagedConcurrencyInterceptor.java:106) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438) at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:619) at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53) at org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99) at org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:109) at org.jboss.as.ejb3.timerservice.TimerTask.invokeBeanMethod(TimerTask.java:189) at org.jboss.as.ejb3.timerservice.TimerTask.callTimeout(TimerTask.java:185) at org.jboss.as.ejb3.timerservice.TimerTask.run(TimerTask.java:159) at org.jboss.as.ejb3.timerservice.TimerServiceImpl$Task$1.run(TimerServiceImpl.java:1211) at org.wildfly.extension.requestcontroller.RequestController$QueuedTask$1.run(RequestController.java:494) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:485) Caused by: org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:147) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:260) at org.hibernate.search.hcore.util.impl.HibernateHelper.unproxy(HibernateHelper.java:49) at org.hibernate.search.engine.impl.HibernateStatelessInitializer.unproxy(HibernateStatelessInitializer.java:39) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.unproxy(DocumentBuilderIndexedEntity.java:878) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.buildDocumentFields(DocumentBuilderIndexedEntity.java:413) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.buildDocumentFieldsForEmbeddedObjects(DocumentBuilderIndexedEntity.java:523) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.buildDocumentFields(DocumentBuilderIndexedEntity.java:432) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.getDocument(DocumentBuilderIndexedEntity.java:354) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.createAddWork(DocumentBuilderIndexedEntity.java:256) at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.addWorkToQueue(DocumentBuilderIndexedEntity.java:198) at org.hibernate.search.engine.impl.WorkPlan$PerEntityWork.enqueueLuceneWork(WorkPlan.java:521) at org.hibernate.search.engine.impl.WorkPlan$PerClassWork.enqueueLuceneWork(WorkPlan.java:283) at org.hibernate.search.engine.impl.WorkPlan.getPlannedLuceneWork(WorkPlan.java:155) at org.hibernate.search.backend.impl.WorkQueue.prepareWorkPlan(WorkQueue.java:114) at org.hibernate.search.backend.impl.BatchedQueueingProcessor.prepareWorks(BatchedQueueingProcessor.java:55) at org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization.beforeCompletion(PostTransactionWorkQueueSynchronization.java:64) at org.hibernate.search.backend.impl.EventSourceTransactionContext$BeforeCommitSynchronizationDelegator.beforeCompletion(EventSourceTransactionContext.java:204) at org.hibernate.resource.transaction.internal.SynchronizationRegistryStandardImpl.notifySynchronizationsBeforeTransactionCompletion(SynchronizationRegistryStandardImpl.java:60) ... 56 more

I did some digging and it might be related to -

Yoann RodièreSeptember 12, 2018 at 8:19 AM
Edited

Thank you for your report.

Unfortunately, Hibernate Search 5.5 is no longer maintained as a community branch, so it won't be receiving a fix for this problem.

That being said, if a later version (5.6.x, 5.9.x or 5.10.x) is still affected, we will definitely try to apply a fix to those branches, and you can upgrade to one of those versions to benefit from the fix.

I was not able to reproduce your issue. Maybe you could try to upgrade to Hibernate Search 5.6 and see if it still affects you? See these instructions for WildFly. Just be careful about the version, 5.6.6.Final has just been released but did not hit Maven Central yet (we're experiencing sync issues), so either grab it from SourceForge or use 5.6.5.Final for now.

Also, there might be more to the problem than the configuration you showed: some corner case related to your overall mapping, some unusual entity saving pattern, ... The best way to help us reproduce your problem would be to provide a test case based on our test case template. I pushed my unsuccessful attempt to reproduce your issue to the HSEARCH-3358 branch of my fork, maybe you could iterate on that?

Rejected

Details

Assignee

Reporter

Affects versions

Priority

Created September 12, 2018 at 5:47 AM
Updated September 20, 2018 at 6:44 AM
Resolved September 20, 2018 at 6:44 AM

Flag notifications