-->
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.  [ 2 posts ] 
Author Message
 Post subject: Exception on creating EntityManagerFactory
PostPosted: Tue Apr 05, 2011 4:15 pm 
Newbie

Joined: Tue Apr 05, 2011 9:37 am
Posts: 3
Hi!

After having some trouble with another implementation of JPA I just tried Hibernate 3.6.2 to see if it might work better.

However, I had no luck to get it working.
On Persistence.createEntityManagerFactory(persistenceUnit, jpaProperties); an exception with the following stacktrace occurs:

Code:
javax.persistence.PersistenceException: [PersistenceUnit: persunit] Unable to configure EntityManagerFactory
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:375)
   at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56)
   at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
   at x.y.z.jpa.JPAManager.initJPA(JPAManager.java:384)
   at x.y.z.jpa.Validator.main(Validator.java:19)
Caused by: java.util.ConcurrentModificationException
   at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
   at java.util.AbstractList$Itr.remove(Unknown Source)
   at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1690)
   at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1396)
   at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1348)
   at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1492)
   at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:193)
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1070)
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:279)
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:363)
   ... 4 more


Since the stacktrace isn't that helpful I don't know where to start
looking for the cause.
Is there a bug or do I have to change my entities?
How can I find out which one must be changed?

Thanks.


Top
 Profile  
 
 Post subject: Re: Exception on creating EntityManagerFactory
PostPosted: Wed Apr 06, 2011 11:30 am 
Newbie

Joined: Tue Apr 05, 2011 9:37 am
Posts: 3
I had to change my object model today - now I can't reproduce the problem anymore.
So it works for me for now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.