[
http://jira.jboss.com/jira/browse/HIBERNATE-46?page=comments#action_12344628 ]
Michael Small commented on HIBERNATE-46:
----------------------------------------
When will this problem be resolved? I've recently upgraded to 4.0.4GA and now I get
the above error. Additionally, I'm getting a related PermGen error:
at $Proxy300.getParticipation(Unknown Source)
at
com.tasconline.flexsystem.web.ui.event.action.GetAccountManagementDataAjaxAction.performAction(GetAccountManagementDataAjaxAction.java:82)
at
com.tasconline.web.ui.ajax.AjaxPhaseListener.handleRequest(AjaxPhaseListener.java:103)
at
com.tasconline.web.ui.ajax.AjaxPhaseListener.afterPhase(AjaxPhaseListener.java:81)
at
org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersAfter(LifecycleImpl.java:536)
at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:164)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
com.tasconline.security.web.ui.filter.SecurityFilter.doFilter(SecurityFilter.java:102)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
com.tasconline.web.ui.filter.InitializeFilter.doFilter(InitializeFilter.java:67)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:107)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:269)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.io.MarshalledObjectForLocalCalls.get(MarshalledObjectForLocalCalls.java:60)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:73)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
... 35 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor876.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:103)
... 68 more
Caused by: java.io.IOException
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:107)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:269)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.ObjectInputStreamProxy.readObjectOverride(ObjectInputStreamProxy.java:68)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:342)
at java.util.ArrayList.readObject(ArrayList.java:591)
... 72 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor876.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:103)
... 92 more
Caused by: org.jboss.serial.exception.SerializationException
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:436)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:411)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
at
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:841)
at
org.jboss.serial.persister.ObjectInputStreamProxy.readObjectOverride(ObjectInputStreamProxy.java:68)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:342)
at java.util.ArrayList.readObject(ArrayList.java:591)
... 96 more
Caused by: java.lang.reflect.InvocationTargetException
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:585)
at
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:426)
... 131 more
Caused by: org.hibernate.HibernateException: Javassist Enhancement failed:
com.tasconline.mbi.MbiParticipant
at
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:88)
at
org.hibernate.proxy.pojo.javassist.SerializableProxy.readResolve(SerializableProxy.java:54)
... 136 more
Caused by: java.lang.RuntimeException: by java.lang.OutOfMemoryError: PermGen space
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:173)
at
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:79)
... 137 more
Caused by: javassist.CannotCompileException: by java.lang.OutOfMemoryError: PermGen space
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:125)
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:169)
... 138 more
Javassist lazy proxy factoring not thread-safe
----------------------------------------------
Key: HIBERNATE-46
URL:
http://jira.jboss.com/jira/browse/HIBERNATE-46
Project: Hibernate
Issue Type: Bug
Environment: JBoss AS 4.0.4 with EJB 3-RC8
Reporter: Ortwin Glück
Assigned To: Steve Ebersole
Multiple threads may simultanously (especially on SMP systems) create proxy classes for
the first time. The JavassistLazyInitializer is not completely thread safe. So the first
thread will successfully create the dynamic class, while a second thread may fail. We saw
this happen a few times at JBoss startup when multiple messages from other systems arrived
via JMS (quite normal when you take your PROD system down for some minutes, as work keeps
queuing up). So multiple MDB threads were running the same transactions (using the same
classes) and thus the probability for this error to occur is close to 100%.
The situation can easily be solved by proper synchronization inside the
JavassistLazyInitializer.
Caused by: java.lang.RuntimeException: by java.lang.LinkageError: duplicate clas
s definition: test/BusinessOrganization_$$_javass
ist_272
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:173)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(
JavassistLazyInitializer.java:79)
... 136 more
Caused by: javassist.CannotCompileException: by java.lang.LinkageError: duplicat
e class definition: test/BusinessOrganization_$$_
javassist_272
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:125)
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:169)
... 137 more
Caused by: java.lang.LinkageError: duplicate class definition:
test/BusinessOrganization_$$_javassist_272
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:117)
... 138 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira