java.util.ConcurrentModificationException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Foreign JMS and XA
    via by Dmitri Maximovich,
  • Concurrent calls from within different threads (servlets) to AbstractApplicationContext.getBeansOfType() leads to the following exception: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) at java.util.HashMap$KeyIterator.next(HashMap.java:818) at org.springframework.beans.factory.support.AbstractBeanFactory.getSingletonNames(AbstractBeanFactory.java:481) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:1 at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:468) at de.deka.techarch.spring.bean.BeanUtils.getFirstInterceptedBeanOfType(BeanUtils.java:67) at de.deka.dekanet.service.context.BusinessServiceFactory.getService(BusinessServiceFactory.java:86) Our code which calls ListableBeanFactory.getBeansOfType() is as follows: /** * Returns the first bean from the {@link Map} returned by * <code>ListableBeanFactory.getBeansOfType(type, true, true)</code> * which is an instances of {@link java.lang.reflect.Proxy}</code>. */ public static final Object getFirstProxiedBeanOfType( ListableBeanFactory factory, Class type) { Map names = factory.getBeansOfType(type, true, true); Iterator iter = names.keySet().iterator(); while (iter.hasNext()) { String name = (String)iter.next(); Object bean = factory.getBean(name); if (bean instanceof Proxy) { return bean; } } return null; }
    via by Torsten Juergeleit,
  • why ConcurrentModificationException ?
    via by 843790,
  • Foreign JMS and XA
    via by 3004,
  • Foreign JMS and XA
    via by 3004,
  • Exceptions in CVS Team Synchronize
    via by ed.burnette,
    • java.util.ConcurrentModificationException at kodo.util.FatalException.writeReplace(FatalException.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:896) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1011) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:299) Caused by: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) at java.util.HashMap$KeyIterator.next(HashMap.java:818) at kodo.meta.JDOMetaDataRepositoryImpl.processRegisteredClasses(JDOMetaDataRepositoryImpl.java:522) at kodo.meta.JDOMetaDataRepositoryImpl.getMetaData(JDOMetaDataRepositoryImpl.java:340) at kodo.meta.DelegatingJDOMetaDataRepository.getMetaData(DelegatingJDOMetaDataRepository.java:167) at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:248) at kodo.jdbc.meta.MappingRepository.getMetaData(MappingRepository.java:237) at kodo.runtime.PersistenceManagerImpl.newStateManager(PersistenceManagerImpl.java:1316) at kodo.runtime.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:1280) at kodo.runtime.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:1223) at com.cmptsis.kiff.global.server.identity.jdo.JdoIdentityDAO.getNextIdentity(JdoIdentityDAO.java:21) at com.cmptsis.kiff.global.server.identity.StandardDBIdentityFacade.nextIdentityByRange(StandardDBIdentityFacade.java:16) at com.cmptsis.kiff.customer.server.facade.CustomerFacadeLogic.createGroup(CustomerFacadeLogic.java:24) at com.cmptsis.kiff.customer.server.facade.ejb.CustomerSessionBean.createGroup(CustomerSessionBean.java:80) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331) at org.jboss.ejb.Container.invoke(Container.java:700) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) ... 6 more

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    iridic
    2 times, last one,
    franky li
    1 times, last one,
    bpbhat77
    2 times, last one,
    21 more bugmates