0 Replies Latest reply on Sep 4, 2014 3:14 AM by eramesh.java

    Hibernate - Jboss  7 Upgrade issue

    eramesh.java Newbie

      Hi ,

       

      We are doing upgradatiion from Jboss 4 to Jboss 7.

       

      I have resolved all the build & deployment issues in local environment and .ear file has been deployed successully.

       

      Iam able to login to the application. But, while creating a policy and click on 'SAVE' button, getting the below exception.

       

      Caused by: org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions

      at org.hibernate.collection.AbstractPersistentCollection.setCurrentSession(AbstractPersistentCollection.java:410) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.WrapVisitor.processCollection(WrapVisitor.java:44) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:101) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.WrapVisitor.processValue(WrapVisitor.java:98) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:55) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.AbstractSaveEventListener.visitCollectionsBeforeSave(AbstractSaveEventListener.java:371) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:273) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) [hibernate-entitymanager-3.3.2.GA.jar:3.3.2.GA]

      at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:610) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:602) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.engine.EJB3CascadingAction$1.cascade(EJB3CascadingAction.java:30) [hibernate-entitymanager-3.3.2.GA.jar:3.2.7.ga]

      at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:269) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:217) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:170) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.engine.Cascade.cascade(Cascade.java:131) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:431) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:265) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49) [hibernate-entitymanager-3.3.2.GA.jar:3.3.2.GA]

      at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:619) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:593) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:597) [hibernate-3.2.7.ga.jar:3.2.7.ga]

      at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:220) [hibernate-entitymanager-3.3.2.GA.jar:3.3.2.GA]

      ... 95 more

       

      Please advise!