Hi
I am using Hibernate-2.1.1 with MySql-4.0.13 and jboss-3.2.1 and when I try to load any persistent class with a collection I get a java.util.ConcurrentModificationException. The architecture is DAO's behind SLSB's. Here is the relevant info:
StackTrace
11:17:58,012 DEBUG [SessionImpl] loading [com.generator.dom.hibernate.StatusType#1]
11:17:58,013 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,018 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,024 DEBUG [SessionImpl] attempting to resolve [com.generator.dom.hibernate.StatusType#1]
11:17:58,025 DEBUG [SessionImpl] object not resolved in any cache [com.generator.dom.hibernate.StatusType#1]
11:17:58,026 DEBUG [EntityPersister] Materializing entity: [com.generator.dom.hibernate.StatusType#1]
11:17:58,028 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,033 DEBUG [BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
11:17:58,034 DEBUG [LocalManagedConnectionFactory] Using properties: {user=root, password=booty}
11:17:58,053 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,054 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,058 DEBUG [SQL] select statustype0_.typeid as typeid0_, statustype0_.type as type0_ from statustypes statustype0_ where statustype0_.typeid=?
11:17:58,062 DEBUG [BatcherImpl] preparing statement
11:17:58,064 DEBUG [LongType] binding '1' to parameter: 1
11:17:58,089 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,221 DEBUG [Loader] processing result set
11:17:58,223 DEBUG [Loader] result row: 1
11:17:58,225 DEBUG [Loader] Initializing object from ResultSet: 1
11:17:58,228 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,254 DEBUG [Loader] Hydrating entity: com.generator.dom.hibernate.StatusType#1
11:17:58,257 DEBUG [StringType] returning 'company' as column: type0_
11:17:58,259 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,263 DEBUG [Loader] done processing result set (1 rows)
11:17:58,265 DEBUG [BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
11:17:58,266 DEBUG [BatcherImpl] closing statement
11:17:58,267 DEBUG [Loader] total objects hydrated: 1
11:17:58,268 DEBUG [SessionImpl] resolving associations for [com.generator.dom.hibernate.StatusType#1]
11:17:58,269 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,272 DEBUG [SessionImpl] collection not cached
11:17:58,276 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,279 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,281 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,292 DEBUG [SessionImpl] done materializing entity [com.generator.dom.hibernate.StatusType#1]
11:17:58,293 DEBUG [SessionImpl] initializing non-lazy collections
11:17:58,295 DEBUG [SessionImpl] initializing collection [com.generator.dom.hibernate.StatusType.status#1]
11:17:58,342 DEBUG [BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
11:17:58,343 DEBUG [SQL] select status0_.statusid as statusid__, status0_.typeid as typeid__ from status_statustypex status0_ where status0_.typeid=?
11:17:58,344 DEBUG [BatcherImpl] preparing statement
11:17:58,346 DEBUG [LongType] binding '1' to parameter: 1
11:17:58,363 DEBUG [Loader] result set contains (possibly empty) collection: [com.generator.dom.hibernate.StatusType.status#1]
11:17:58,365 DEBUG [SessionImpl] uninitialized collection: initializing
11:17:58,367 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,369 DEBUG [Loader] processing result set
11:17:58,370 DEBUG [Loader] result row:
11:17:58,372 DEBUG [LongType] returning '1' as column: typeid__
11:17:58,373 DEBUG [Loader] found row of collection: [com.generator.dom.hibernate.StatusType.status#1]
11:17:58,374 DEBUG [SessionImpl] reading row
11:17:58,376 DEBUG [LongType] returning '1' as column: statusid__
11:17:58,377 DEBUG [SessionImpl] loading [com.generator.dom.hibernate.Status#1]
11:17:58,379 DEBUG [Loader] result row:
11:17:58,380 DEBUG [LongType] returning '1' as column: typeid__
11:17:58,381 DEBUG [Loader] found row of collection: [com.generator.dom.hibernate.StatusType.status#1]
11:17:58,382 DEBUG [SessionImpl] reading row
11:17:58,432 DEBUG [LongType] returning '2' as column: statusid__
11:17:58,433 DEBUG [SessionImpl] loading [com.generator.dom.hibernate.Status#2]
11:17:58,435 DEBUG [Loader] done processing result set (2 rows)
11:17:58,436 DEBUG [BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
11:17:58,437 DEBUG [BatcherImpl] closing statement
11:17:58,438 DEBUG [SessionImpl] 1 collections were found in result set
11:17:58,440 DEBUG [SessionImpl] attempting to resolve [com.generator.dom.hibernate.Status#1]
11:17:58,441 DEBUG [SessionImpl] object not resolved in any cache [com.generator.dom.hibernate.Status#1]
11:17:58,441 DEBUG [EntityPersister] Materializing entity: [com.generator.dom.hibernate.Status#1]
11:17:58,442 DEBUG [BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
11:17:58,443 DEBUG [SQL] select status0_.statusid as statusid0_, status0_.status as status0_ from status status0_ where status0_.statusid=?
11:17:58,444 DEBUG [BatcherImpl] preparing statement
11:17:58,446 DEBUG [LongType] binding '1' to parameter: 1
11:17:58,480 DEBUG [Loader] processing result set
11:17:58,482 DEBUG [Loader] result row: 1
11:17:58,483 DEBUG [Loader] Initializing object from ResultSet: 1
11:17:58,484 DEBUG [Loader] Hydrating entity: com.generator.dom.hibernate.Status#1
11:17:58,485 DEBUG [StringType] returning 'active' as column: status0_
11:17:58,487 DEBUG [Loader] done processing result set (1 rows)
11:17:58,488 DEBUG [BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
11:17:58,489 DEBUG [BatcherImpl] closing statement
11:17:58,490 DEBUG [Loader] total objects hydrated: 1
11:17:58,491 DEBUG [SessionImpl] resolving associations for [com.generator.dom.hibernate.Status#1]
11:17:58,492 DEBUG [SessionImpl] collection not cached
11:17:58,493 DEBUG [SessionImpl] done materializing entity [com.generator.dom.hibernate.Status#1]
11:17:58,494 DEBUG [SessionImpl] attempting to resolve [com.generator.dom.hibernate.Status#2]
11:17:58,495 DEBUG [SessionImpl] object not resolved in any cache [com.generator.dom.hibernate.Status#2]
11:17:58,496 DEBUG [EntityPersister] Materializing entity: [com.generator.dom.hibernate.Status#2]
11:17:58,545 DEBUG [BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
11:17:58,547 DEBUG [SQL] select status0_.statusid as statusid0_, status0_.status as status0_ from status status0_ where status0_.statusid=?
11:17:58,548 DEBUG [BatcherImpl] preparing statement
11:17:58,575 DEBUG [LongType] binding '2' to parameter: 1
11:17:58,578 DEBUG [Loader] processing result set
11:17:58,580 DEBUG [Loader] result row: 2
11:17:58,581 DEBUG [Loader] Initializing object from ResultSet: 2
11:17:58,582 DEBUG [Loader] Hydrating entity: com.generator.dom.hibernate.Status#2
11:17:58,583 DEBUG [StringType] returning 'inactive' as column: status0_
11:17:58,584 DEBUG [Loader] done processing result set (1 rows)
11:17:58,585 DEBUG [BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
11:17:58,586 DEBUG [BatcherImpl] closing statement
11:17:58,587 DEBUG [Loader] total objects hydrated: 1
11:17:58,611 DEBUG [SessionImpl] resolving associations for [com.generator.dom.hibernate.Status#2]
11:17:58,612 DEBUG [SessionImpl] collection not cached
11:17:58,614 DEBUG [SessionImpl] done materializing entity [com.generator.dom.hibernate.Status#2]
11:17:58,615 DEBUG [SessionImpl] collection fully initialized: [com.generator.dom.hibernate.StatusType.status#1]
11:17:58,616 DEBUG [SessionImpl] 1 collections initialized
11:17:58,617 DEBUG [SessionImpl] initializing non-lazy collections
11:17:58,618 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,622 DEBUG [HibernateInterceptor] Eagerly flushing Hibernate session
11:17:58,623 DEBUG [SessionImpl] flushing session
11:17:58,624 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,628 DEBUG [SessionImpl] Flushing entities and processing referenced collections
11:17:58,630 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,632 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,634 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,642 DEBUG [WrapVisitor] Wrapped collection in role: com.generator.dom.hibernate.StatusType.status
11:17:58,644 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,695 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,699 DEBUG [SessionImpl] Collection found: [com.generator.dom.hibernate.StatusType.status#1], was: [<unreferenced>]
11:17:58,700 DEBUG [WrapVisitor] Wrapped collection in role: com.generator.dom.hibernate.Status.types
11:17:58,701 DEBUG [SessionImpl] Collection found: [com.generator.dom.hibernate.Status.types#1], was: [<unreferenced>]
11:17:58,702 DEBUG [WrapVisitor] Wrapped collection in role: com.generator.dom.hibernate.Status.types
11:17:58,704 DEBUG [SessionImpl] Collection found: [com.generator.dom.hibernate.Status.types#2], was: [<unreferenced>]
11:17:58,705 DEBUG [SessionImpl] Processing unreferenced collections
11:17:58,706 DEBUG [SessionImpl] Collection dereferenced: [com.generator.dom.hibernate.StatusType.status#1]
11:17:58,707 DEBUG [SessionImpl] Collection dereferenced: [com.generator.dom.hibernate.Status.types#1]
11:17:58,708 DEBUG [SessionImpl] Collection dereferenced: [com.generator.dom.hibernate.Status.types#2]
11:17:58,709 DEBUG [SessionImpl] Scheduling collection removes/(re)creates/updates
11:17:58,710 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,713 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,718 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,721 DEBUG [SessionImpl] Flushed: 0 insertions, 0 updates, 0 deletions to 3 objects
11:17:58,722 DEBUG [SessionImpl] Flushed: 3 (re)creations, 0 updates, 3 removals to 6 collections
11:17:58,724 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,728 DEBUG [Printer] listing entities:
11:17:58,731 DEBUG [SessionImpl] initializing collection [com.generator.dom.hibernate.Status.types#1]
11:17:58,732 DEBUG [BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
11:17:58,733 DEBUG [SQL] select types0_.typeid as typeid__, types0_.statusid as statusid__ from status_statustypex types0_ where types0_.statusid=?
11:17:58,734 DEBUG [BatcherImpl] preparing statement
11:17:58,738 DEBUG [LongType] binding '1' to parameter: 1
11:17:58,742 DEBUG [Loader] result set contains (possibly empty) collection: [com.generator.dom.hibernate.Status.types#1]
11:17:58,743 DEBUG [SessionImpl] uninitialized collection: initializing
11:17:58,744 DEBUG [Loader] processing result set
11:17:58,745 DEBUG [Loader] result row:
11:17:58,747 DEBUG [LongType] returning '1' as column: statusid__
11:17:58,748 DEBUG [Loader] found row of collection: [com.generator.dom.hibernate.Status.types#1]
11:17:58,749 DEBUG [SessionImpl] reading row
11:17:58,750 DEBUG [LongType] returning '1' as column: typeid__
11:17:58,751 DEBUG [SessionImpl] loading [com.generator.dom.hibernate.StatusType#1]
11:17:58,752 DEBUG [SessionImpl] attempting to resolve [com.generator.dom.hibernate.StatusType#1]
11:17:58,753 DEBUG [SessionImpl] resolved object in session cache [com.generator.dom.hibernate.StatusType#1]
11:17:58,802 DEBUG [Loader] result row:
11:17:58,804 DEBUG [LongType] returning '1' as column: statusid__
11:17:58,805 DEBUG [Loader] found row of collection: [com.generator.dom.hibernate.Status.types#1]
11:17:58,806 DEBUG [SessionImpl] reading row
11:17:58,807 DEBUG [LongType] returning '2' as column: typeid__
11:17:58,808 DEBUG [SessionImpl] loading [com.generator.dom.hibernate.StatusType#2]
11:17:58,809 DEBUG [Loader] result row:
11:17:58,811 DEBUG [LongType] returning '1' as column: statusid__
11:17:58,812 DEBUG [Loader] found row of collection: [com.generator.dom.hibernate.Status.types#1]
11:17:58,813 DEBUG [SessionImpl] reading row
11:17:58,814 DEBUG [LongType] returning '6' as column: typeid__
11:17:58,815 DEBUG [SessionImpl] loading [com.generator.dom.hibernate.StatusType#6]
11:17:58,816 DEBUG [Loader] done processing result set (3 rows)
11:17:58,817 DEBUG [BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
11:17:58,818 DEBUG [BatcherImpl] closing statement
11:17:58,819 DEBUG [SessionImpl] 1 collections were found in result set
11:17:58,820 DEBUG [SessionImpl] attempting to resolve [com.generator.dom.hibernate.StatusType#2]
11:17:58,821 DEBUG [SessionImpl] object not resolved in any cache [com.generator.dom.hibernate.StatusType#2]
11:17:58,822 DEBUG [EntityPersister] Materializing entity: [com.generator.dom.hibernate.StatusType#2]
11:17:58,823 DEBUG [BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
11:17:58,824 DEBUG [SQL] select statustype0_.typeid as typeid0_, statustype0_.type as type0_ from statustypes statustype0_ where statustype0_.typeid=?
11:17:58,825 DEBUG [BatcherImpl] preparing statement
11:17:58,826 DEBUG [LongType] binding '2' to parameter: 1
11:17:58,828 DEBUG [Loader] processing result set
11:17:58,830 DEBUG [Loader] result row: 2
11:17:58,831 DEBUG [Loader] Initializing object from ResultSet: 2
11:17:58,832 DEBUG [Loader] Hydrating entity: com.generator.dom.hibernate.StatusType#2
11:17:58,833 DEBUG [StringType] returning 'project' as column: type0_
11:17:58,834 DEBUG [Loader] done processing result set (1 rows)
11:17:58,835 DEBUG [BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
11:17:58,836 DEBUG [BatcherImpl] closing statement
11:17:58,860 DEBUG [Loader] total objects hydrated: 1
11:17:58,862 DEBUG [SessionImpl] resolving associations for [com.generator.dom.hibernate.StatusType#2]
11:17:58,863 DEBUG [SessionImpl] collection not cached
11:17:58,864 DEBUG [SessionImpl] done materializing entity [com.generator.dom.hibernate.StatusType#2]
11:17:58,865 DEBUG [SessionImpl] attempting to resolve [com.generator.dom.hibernate.StatusType#6]
11:17:58,866 DEBUG [SessionImpl] object not resolved in any cache [com.generator.dom.hibernate.StatusType#6]
11:17:58,867 DEBUG [EntityPersister] Materializing entity: [com.generator.dom.hibernate.StatusType#6]
11:17:58,868 DEBUG [BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
11:17:58,869 DEBUG [SQL] select statustype0_.typeid as typeid0_, statustype0_.type as type0_ from statustypes statustype0_ where statustype0_.typeid=?
11:17:58,870 DEBUG [BatcherImpl] preparing statement
11:17:58,871 DEBUG [LongType] binding '6' to parameter: 1
11:17:58,873 DEBUG [Loader] processing result set
11:17:58,875 DEBUG [Loader] result row: 6
11:17:58,876 DEBUG [Loader] Initializing object from ResultSet: 6
11:17:58,877 DEBUG [Loader] Hydrating entity: com.generator.dom.hibernate.StatusType#6
11:17:58,878 DEBUG [StringType] returning 'user' as column: type0_
11:17:58,879 DEBUG [Loader] done processing result set (1 rows)
11:17:58,880 DEBUG [BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
11:17:58,881 DEBUG [BatcherImpl] closing statement
11:17:58,882 DEBUG [Loader] total objects hydrated: 1
11:17:58,883 DEBUG [SessionImpl] resolving associations for [com.generator.dom.hibernate.StatusType#6]
11:17:58,884 DEBUG [SessionImpl] collection not cached
11:17:58,885 DEBUG [SessionImpl] done materializing entity [com.generator.dom.hibernate.StatusType#6]
11:17:58,886 DEBUG [SessionImpl] collection fully initialized: [com.generator.dom.hibernate.Status.types#1]
11:17:58,887 DEBUG [SessionImpl] 1 collections initialized
11:17:58,888 DEBUG [SessionImpl] initializing non-lazy collections
11:17:58,890 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,893 DEBUG [Printer] com.generator.dom.hibernate.Status{types=[StatusType#2, StatusType#6, StatusType#1], status=active, id=1}
11:17:58,895 DEBUG [TransactionSynchronizationManager] Removed value [org.springframework.orm.hibernate.SessionHolder@d712ed] for key [net.sf.hibernate.impl.SessionFactoryImpl@7ba8d4] from thread [PoolThread-9]
11:17:58,896 DEBUG [SessionFactoryUtils] Closing Hibernate session
11:17:58,898 DEBUG [SessionImpl] closing session
11:17:58,899 DEBUG [SessionImpl] disconnecting session
11:17:58,901 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,952 DEBUG [UnifiedClassLoader] New jmx UCL with url null
11:17:58,958 DEBUG [CacheSynchronization] transaction before completion callback
11:17:58,962 DEBUG [CacheSynchronization] transaction after completion callback, status: 4
11:17:58,964 DEBUG [SessionImpl] transaction completion
11:17:58,966 ERROR [LogInterceptor] RuntimeException:
11:17:58,968 DEBUG [UnifiedClassLoader] New jmx UCL with url null
com.generator.exceptions.ApplicationRuntimeException: Could not retrieve status information: null
at com.generator.ejb.util.AbstractContextAwareSessionBean.handleException(AbstractContextAwareSessionBean.java:55)
at com.generator.ejb.reference.ReferenceDataBean.getStatusByStatusType(ReferenceDataBean.java:84)
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:629)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
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:243)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
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:322)
at org.jboss.ejb.Container.invoke(Container.java:674)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
at $Proxy59.getStatusByStatusType(Unknown Source)
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.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:47)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:196)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:135)
at $Proxy53.getStatusByStatusType(Unknown Source)
at com.generator.service.ReferenceDataServiceImpl.getStatusByStatusType(ReferenceDataServiceImpl.java:53)
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.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:201)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at com.generator.service.util.SecurityInterceptor.invoke(SecurityInterceptor.java:50)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:196)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:135)
at $Proxy58.getStatusByStatusType(Unknown Source)
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.openamf.invoker.RankedMethod.invoke(RankedMethod.java:59)
at com.generator.service.util.SpringBeanInvoker.invokeServiceMethod(SpringBeanInvoker.java:74)
at com.generator.service.util.SpringBeanInvoker.invokeService(SpringBeanInvoker.java:58)
at org.openamf.DefaultGateway.invokeBody(DefaultGateway.java:161)
at org.openamf.DefaultGateway.processMessage(DefaultGateway.java:134)
at org.openamf.DefaultGateway.service(DefaultGateway.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
at org.mortbay.http.HttpServer.service(HttpServer.java:863)
at org.jboss.jetty.Jetty.service(Jetty.java:460)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
Underlying Throwable stack trace follows:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:762)
at java.util.HashMap$ValueIterator.next(HashMap.java:792)
at net.sf.hibernate.impl.Printer.toString(Printer.java:82)
at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2228)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2186)
at org.springframework.orm.hibernate.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:183)
at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:85)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:196)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:135)
at $Proxy61.getStatusByStatusType(Unknown Source)
at com.generator.ejb.reference.ReferenceDataBean.getStatusByStatusType(ReferenceDataBean.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:629)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
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:243)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
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:322)
at org.jboss.ejb.Container.invoke(Container.java:674)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
at $Proxy59.getStatusByStatusType(Unknown Source)
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.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:47)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:196)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:135)
at $Proxy53.getStatusByStatusType(Unknown Source)
at com.generator.service.ReferenceDataServiceImpl.getStatusByStatusType(ReferenceDataServiceImpl.java:53)
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.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:201)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at com.generator.service.util.SecurityInterceptor.invoke(SecurityInterceptor.java:50)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:196)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:135)
at $Proxy58.getStatusByStatusType(Unknown Source)
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.openamf.invoker.RankedMethod.invoke(RankedMethod.java:59)
at com.generator.service.util.SpringBeanInvoker.invokeServiceMethod(SpringBeanInvoker.java:74)
at com.generator.service.util.SpringBeanInvoker.invokeService(SpringBeanInvoker.java:58)
at org.openamf.DefaultGateway.invokeBody(DefaultGateway.java:161)
at org.openamf.DefaultGateway.processMessage(DefaultGateway.java:134)
at org.openamf.DefaultGateway.service(DefaultGateway.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
at org.mortbay.http.HttpServer.service(HttpServer.java:863)
at org.jboss.jetty.Jetty.service(Jetty.java:460)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
The hibernate code:
public Collection getStatusByStatusType(String typeId) {
Session session = SessionFactoryUtils.getSession(this.getSessionFactory(), false);
try {
StatusType type = (StatusType) session.load(StatusType.class, DaoUtils.getIdAsLong(typeId));
Set stats = type.getStatus();
Iterator i = stats.iterator();
while (i.hasNext()) {
Status s = (Status) i.next();
s.getId();
s.getStatus();
}
return stats;
}
catch (HibernateException e) {
throw SessionFactoryUtils.convertHibernateAccessException(e);
}
}
and the mapping files of the persistent classes involved
<hibernate-mapping>
<class name="com.generator.dom.hibernate.Status" table="status" discriminator-value="stts" proxy="com.generator.dom.hibernate.Status">
<id name="id" column="statusid" type="long">
<generator class="native"/>
</id>
<property name="status" type="java.lang.String" length="60" not-null="true"/>
<set name="types" table="status_statustypex" lazy="true">
<key column="statusid"/>
<many-to-many column="typeid" class="com.generator.dom.hibernate.StatusType"/>
</set>
</class>
</hibernate-mapping>
<hibernate-mapping>
<class name="com.generator.dom.hibernate.StatusType" table="statustypes" discriminator-value="stty" proxy="com.generator.dom.hibernate.StatusType">
<id name="id" column="typeid" type="long">
<generator class="native"/>
</id>
<property name="type" type="java.lang.String" length="60" not-null="true"/>
<set name="status" table="status_statustypex" inverse="true" lazy="true">
<key column="typeid"/>
<many-to-many column="statusid" class="com.generator.dom.hibernate.Status"/>
</set>
</class>
</hibernate-mapping>
I notice on another forum with this problem that the equals method could be a problem. The following equals method is identical for all persistent classes:
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Status)) {
return false;
}
if (this.getId() == null) {
return false;
}
Long otherId = ((Status)o).getId();
return (this.getId() == otherId) ? true : false;
}
Could this equals method be causing the exception?
Thanks for any help in advance
cheers
andy
|