HibernateSystemE xception: Illegal attempt to associate a collectionwith two open sessions

Discussion in 'Java' started by iadb, Jul 17, 2011.

  1. iadb

    iadb Guest

    I am getting following exception, please let me know how to fix it..


    org.springframework.orm.hibernate.HibernateSystemE xception: Illegal
    attempt to associate a collection with two open sessions; nested
    exception is net.sf.hibernate.HibernateException: Illegal attempt to
    associate a collection with two open sessions
    net.sf.hibernate.HibernateException: Illegal attempt to associate a
    collection with two open sessions
    at net.sf.hibernate.collection.PersistentCollection.s
    etCurrentSession(PersistentCollection.java:257)
    at net.sf.hibernate.impl.OnUpdateVisitor.processColle
    ction(OnUpdateVisitor.java:38)
    at net.sf.hibernate.impl.AbstractVisitor.processValue
    (AbstractVisitor.java:69)
    at net.sf.hibernate.impl.AbstractVisitor.processValue
    s(AbstractVisitor.java:36)
    at net.sf.hibernate.impl.AbstractVisitor.process(Abst ractVisitor.java:
    91)
    at net.sf.hibernate.impl.SessionImpl.doUpdateMutable( SessionImpl.java:
    1465)
    at net.sf.hibernate.impl.SessionImpl.doUpdate(Session Impl.java:1479)
    at net.sf.hibernate.impl.SessionImpl.update(SessionIm pl.java:1364)
    at org.springframework.orm.hibernate.HibernateTemplat e
    $11.doInHibernate(HibernateTemplate.java:530)
    at org.springframework.orm.hibernate.HibernateTemplat
    e.execute(HibernateTemplate.java:317)
    at org.springframework.orm.hibernate.HibernateTemplat
    e.update(HibernateTemplate.java:527)
    at org.springframework.orm.hibernate.HibernateTemplat
    e.update(HibernateTemplate.java:523)
    at com.fmr.eca.dao.hibernate.ExpenseTypeDaoHibernate.
    modifyExpenseType(ExpenseTypeDaoHibernate.java:141 )
    at junit.com.fmr.eca.dao.hibernate.TestExpenseTypeDao
    Hibernate.testModifyExpenseTypes(TestExpenseTypeDa oHibernate.java:
    145)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native
    MethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
    legatingMethodAccessorImpl.java:41)
    at java.lang.reflect.Method.invoke(Method.java:386)
    at junit.framework.TestCase.runTest(TestCase.java:154 )
    at junit.framework.TestCase.runBare(TestCase.java:127 )
    at junit.framework.TestResult$1.protect(TestResult.ja va:106)
    at junit.framework.TestResult.runProtected(TestResult .java:124)
    at junit.framework.TestResult.run(TestResult.java:109 )
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:2 08)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu
    nner.runTests(RemoteTestRunner.java:392)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu
    nner.run(RemoteTestRunner.java:276)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu
    nner.main(RemoteTestRunner.java:167)



    http://www.internetarticlesdb.com
     
    iadb, Jul 17, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ken Cox [Microsoft MVP]

    Re: Relationship between IIS Sessions and ASP.NET Sessions?

    Ken Cox [Microsoft MVP], Aug 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    5,376
    Luther Miller
    Aug 8, 2003
  2. scottymo
    Replies:
    3
    Views:
    711
    Dominick Baier
    Sep 30, 2006
  3. GMI
    Replies:
    3
    Views:
    511
    Tad McClellan
    Jun 19, 2005
  4. Austin Matzko

    How best to associate two DOM elements?

    Austin Matzko, Dec 3, 2009, in forum: Javascript
    Replies:
    3
    Views:
    104
    Thomas 'PointedEars' Lahn
    Dec 4, 2009
  5. Ricardo Nuno

    How associate two HashMaps

    Ricardo Nuno, May 8, 2012, in forum: Java
    Replies:
    4
    Views:
    409
Loading...

Share This Page