Announcement Announcement Module
Collapse
No announcement yet.
java.util.ConcurrentModificationException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.util.ConcurrentModificationException

    Hi ,

    I refactored all my Hibernate 2 to Hibernate 3.03 and am using
    Springs latest release for handling hibernate .


    am getting this error


    java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextEntry(HashMap.j ava:782)
    at java.util.HashMap$EntryIterator.next(HashMap.java: 824)
    at java.util.AbstractMap.toString(AbstractMap.java:58 6)
    at java.lang.String.valueOf(String.java:2131)
    at java.lang.StringBuffer.append(StringBuffer.java:37 0)
    at org.hibernate.engine.PersistenceContext.toString(P ersistenceContext.java:1007)
    at java.lang.String.valueOf(String.java:2131)
    at java.lang.StringBuffer.append(StringBuffer.java:37 0)
    at org.hibernate.impl.SessionImpl.toString(SessionImp l.java:1493)
    at java.lang.String.valueOf(String.java:2131)
    at java.lang.StringBuffer.append(StringBuffer.java:37 0)
    at org.springframework.orm.hibernate3.HibernateTransa ctionManager.doCommit(HibernateTransactionManager. java:480)
    at org.springframework.transaction.support.AbstractPl atformTransactionManager.commit(AbstractPlatformTr ansactionManager.java:401)
    at org.springframework.transaction.interceptor.Transa ctionAspectSupport.doCommitTransactionAfterReturni ng(TransactionAspectSupport.java:258)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:67)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :144)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:174)
    at $Proxy10.getParamByNumber(Unknown Source)
    at com.search.web.action.ViewAction.executeAction(Vie wAction.java:117)
    at com.common.MyAction.execute(HomerAction.java:126)
    at org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:421)
    at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:226)
    at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1164)
    at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:415)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletI nvocationAction.run(ServletStubImpl.java:996)
    at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:419)
    at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:315)
    at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :6452)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:3661)
    at weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:2630)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178



    Thanks and Regards,

    TOM

  • #2
    Check your code - I think you giving a list of parameters to Hibernate and afterwards in your code you are modifing it's content.
    Your exception is thrown when doing an iteration over a collection that is being modified during the loop.

    Comment


    • #3
      This problem was solved when i changed the level of logging From DEBUG to ERROR or FATAL. (This should not be the case) .

      Heard that there is a bug in hibernate SessionImpl.toString method which gets invoked when spring DEBUG logging is enabled.

      Changing logging level is a temporary fix.
      what would be a correct fix for this ?.

      Thanks and Regards,

      TOM
      :arrow: [/img][/code][/quote]

      Comment


      • #4
        I think you should take this matter on the HB forums. Try to isolate the code and show an example on how to reproduce the error in order to get a quick fix.

        Comment

        Working...
        X