-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: ConcurrentModificationException when closing the session
PostPosted: Thu Jul 15, 2010 9:08 am 
Beginner
Beginner

Joined: Mon Mar 01, 2010 12:24 pm
Posts: 22
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


Top
 Profile  
 
 Post subject: Re: ConcurrentModificationException when closing the session
PostPosted: Thu Jul 15, 2010 9:33 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi Matti,

can you post which testcode you are trying to execute? Is this some sort of base class for your application test suite?

--Hardy


Top
 Profile  
 
 Post subject: Re: ConcurrentModificationException when closing the session
PostPosted: Fri Jul 16, 2010 4:52 am 
Beginner
Beginner

Joined: Mon Mar 01, 2010 12:24 pm
Posts: 22
Hi Hardy,

I have got a complex test suite so I need a little bit more time to find which part of the test suite goes in this state, this exception)

Regards,
Matti


Top
 Profile  
 
 Post subject: Re: ConcurrentModificationException when closing the session
PostPosted: Fri Jul 16, 2010 6:45 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Sure, first step is to isolate the problem :) Let us know when you know more.


Top
 Profile  
 
 Post subject: Re: ConcurrentModificationException when closing the session
PostPosted: Wed Jul 21, 2010 6:59 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi Matti,
I guess you're running your tests in parallel (testNG ?) and each test is creating/destroying the SessionFactory ?

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.