Announcement Announcement Module
No announcement yet.
java.util.ConcurrentModificationException Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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

    at java.util.HashMap$HashIterator.nextEntry(HashMap.j ava:782)
    at java.util.HashMap$ 824)
    at java.util.AbstractMap.toString( 6)
    at java.lang.String.valueOf(
    at java.lang.StringBuffer.append( 0)
    at org.hibernate.engine.PersistenceContext.toString(P
    at java.lang.String.valueOf(
    at java.lang.StringBuffer.append( 0)
    at org.hibernate.impl.SessionImpl.toString(SessionImp
    at java.lang.String.valueOf(
    at java.lang.StringBuffer.append( 0)
    at org.springframework.orm.hibernate3.HibernateTransa ctionManager.doCommit(HibernateTransactionManager. java:480)
    at atformTransactionManager.commit(AbstractPlatformTr
    at org.springframework.transaction.interceptor.Transa ctionAspectSupport.doCommitTransactionAfterReturni ng(
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:67)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :144)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(
    at $Proxy10.getParamByNumber(Unknown Source)
    at com.common.MyAction.execute(
    at org.apache.struts.action.RequestProcessor.processA ctionPerform(
    at org.apache.struts.action.RequestProcessor.process(
    at org.apache.struts.action.ActionServlet.process(Act
    at org.apache.struts.action.ActionServlet.doPost(Acti
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletI
    at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(
    at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(
    at weblogic.servlet.internal.WebAppServletContext$Ser :6452)
    at t.doAs(
    at weblogic.servlet.internal.WebAppServletContext.inv okeServlet(
    at weblogic.servlet.internal.ServletRequestImpl.execu te(
    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea
    at va:178

    Thanks and Regards,


  • #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.


    • #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,

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


      • #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.