2 Replies Latest reply on Dec 2, 2002 12:18 PM by tripperm

    java.util.ConcurrentModificationException on XAPoolDataSourc

    luxmatic

      Using Jboss 2.44

      I'm tracking down a problem we occasionally have during load tests when we try to get a connection from a XAPoolDataSource. The exception is not very informative and doesn't give me a concrete approach to solve the problem.

      Anybody give me insight/help with this? Thanks!

      java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.next(HashMap.java(Compiled Code))
      at org.jboss.pool.ObjectPool.getObject(Unknown Source)
      at org.jboss.pool.ObjectPool.getObject(Unknown Source)
      at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(Unknown Source)
      ...

      The datasource is setup as:


      jdbc/yyy
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl

      jdbc:mysql://xxxxxxxxx:3306/logging?autoReconnect=true
      1200000
      xxxxxxxxx
      150

      false
      false
      false
      true
      120000
      1800000
      false
      false
      1.0
      0


      Thanks very much,
      David

        • 1. Re: java.util.ConcurrentModificationException on XAPoolDataS
          tripperm

          This is the exact same problem we experience intermittently. Currently we are using Jboss 2.4.6 with Tomcat 4.0.3 along with jdk 1.3.1_01. My question is whether or not this has to do with resizing of the connection pool. Could it be that one process is iteration over the connections looking for one to hand out, while another process comes along and resizes the pool by adding or removing a connection from the HashMap? That would seem to explain the exception that is being thrown in this case.

          Does anyone have any ideas on this? Is it a bug that needs to be submitted? And does this problem correct itself in Jboss 3 (which we are currently migrating our app over to)?

          Thanks in advance for any help.

          • 2. Re: java.util.ConcurrentModificationException on XAPoolDataS
            tripperm

            As a followup to my previous post, the problem still occurrs in JBoss 3. We are currently using JBoss 3.0.2 with Tomcat 4.0.4 with jdk 1.3.1_01. Every now and then the following error appears:

            java.util.ConcurrentModificationException
            at java.util.HashMap$HashIterator.next(HashMap.java:736)
            at org.jboss.pool.ObjectPool.getObject(ObjectPool.java:630)
            at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:215)
            at com.pdsisoft.staffeasy.authority.PersonAuthorityCheckBean.getConnection(PersonAuthorityCheckBean.java:185)
            at com.pdsisoft.staffeasy.authority.PersonAuthorityCheckBean.getOrgIDsByCapability(PersonAuthorityCheckBean.java:777)
            at com.pdsisoft.staffeasy.authority.PersonAuthorityCheckBean.isCapable(PersonAuthorityCheckBean.java:446)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:542)
            at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:299)
            at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:82)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
            at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:286)
            at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:506)
            at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335)
            at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:123)
            at $Proxy63.isCapable(Unknown Source)
            at com.pdsisoft.staffeasy.calendar.CalendarEventHandler.configureWorkEventItems(CalendarEventHandler.java:454)
            at com.pdsisoft.staffeasy.calendar.CalendarEventHandler.listEvent(CalendarEventHandler.java:218)
            at com.pdsisoft.staffeasy.calendar.CalendarEventHandler.processEvent(CalendarEventHandler.java:45)
            at com.pdsisoft.core.BusinessController.processEvent(BusinessController.java:116)
            at com.pdsisoft.staffeasy.control.StaffEasyControllerBean.processEvent(StaffEasyControllerBean.java:178)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:542)
            at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:299)
            at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:82)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
            at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:286)
            at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:506)
            at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335)
            at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:123)
            at $Proxy89.processEvent(Unknown Source)
            at com.pdsisoft.staffeasy.control.StaffEasyEventDispatcher.sendEvent(StaffEasyEventDispatcher.java:48)
            at com.pdsisoft.staffeasy.calendar.CalendarEventFactory.sendListEvent(CalendarEventFactory.java:33)
            at com.pdsisoft.staffeasy.calendar.CalendarFlowHandler.doViewCalendar(CalendarFlowHandler.java:313)
            at com.pdsisoft.staffeasy.calendar.CalendarFlowHandler.doViewDefaultCalendar(CalendarFlowHandler.java:254)
            at com.pdsisoft.staffeasy.calendar.CalendarFlowHandler.processRequest(CalendarFlowHandler.java:78)
            at com.pdsisoft.core.ServletController.sendToDeviceController(ServletController.java:112)
            at com.pdsisoft.core.ServletController.doGet(ServletController.java:57)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
            at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
            at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
            at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
            at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
            at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
            at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
            at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
            at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
            at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
            at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
            at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
            at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
            at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:429)
            at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:495)
            at java.lang.Thread.run(Thread.java:484)

            As you can see the problem is thrown when attempting to get a database connection from JBoss. Has anyone figured out how to get around this, and do later versions of JBoss deal with this at all (i.e. 3.0.3, or 3.0.4).

            Thanks