Hi all,
When running my test suite, I get the following error at the end:
Code:
org.hibernate.HibernateException: could not destruct listeners
at org.hibernate.event.EventListeners.destroyListeners(EventListeners.java:226)
at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:983)
...
Caused by: java.util.ConcurrentModificationException
at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:762)
at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:801)
at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:799)
at org.hibernate.search.event.ContextHolder.removeSearchFactoryFromCache(ContextHolder.java:71)
at org.hibernate.search.event.FullTextIndexEventListener.temptativeContextCleaning(FullTextIndexEventListener.java:190)
at org.hibernate.search.event.FullTextIndexEventListener.cleanup(FullTextIndexEventListener.java:183)
at org.hibernate.event.EventListeners$2.processListener(EventListeners.java:219)
at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181)
at org.hibernate.event.EventListeners.destroyListeners(EventListeners.java:215)
... 21 more
I tried by adding synchonized to my method which closes the session but without success!
Anyone has an idea?
Regards,
Matti