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.