2 Replies Latest reply on Oct 26, 2011 6:02 AM by Serkan Eskici

    Could not create instance of org.hibernate.ejb.QueryImpl

    Diego Mariano Newbie

      Hello everyone,


      I have a problem that can not solve.
      When my application is still some time and the user returns the following error is returned.


      My stateful bean has a property that is not injected by Seam and has a query created by entityManager. When the page accesses the bean, it can not return the query and the error occurs.


      Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.jboss.serial.exception.SerializationException: Could not create instance of org.hibernate.ejb.QueryImpl - org.hibernate.ejb.QueryImpl
           at org.jboss.ejb3.interceptor.LifecycleInterceptorHandler.postActivate(LifecycleInterceptorHandler.java:152)
           at org.jboss.ejb3.stateful.StatefulContainer.invokePostActivate(StatefulContainer.java:409)
           at org.jboss.ejb3.stateful.StatefulBeanContext.postActivate(StatefulBeanContext.java:388)
           at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:316)
           at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:387)
           at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:375)
           at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:61)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
           at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:206)
           at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:119)
           at $Proxy219.getPesquisaTreinamento(Unknown Source)
           at sun.reflect.GeneratedMethodAccessor364.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
           at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
           at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
           at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:43)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
           at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
           at org.javassist.tmp.java.lang.Object_$$_javassist_seam_14.getPesquisaTreinamento(Object_$$_javassist_seam_14.java)
           at sun.reflect.GeneratedMethodAccessor363.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
           at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
           at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
           at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
           at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
           at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
           at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
           ... 64 more
      Caused by: java.lang.RuntimeException: org.jboss.serial.exception.SerializationException: Could not create instance of org.hibernate.ejb.QueryImpl - org.hibernate.ejb.QueryImpl
           at org.jboss.ejb3.stateful.StatefulBeanContext.extractBeanAndInterceptors(StatefulBeanContext.java:822)
           at org.jboss.ejb3.stateful.StatefulBeanContext.getInterceptorInstances(StatefulBeanContext.java:781)
           at org.jboss.ejb3.interceptor.LifecycleInvocationContextImpl.getLifecycleInvocationContext(LifecycleInvocationContextImpl.java:65)
           at org.jboss.ejb3.interceptor.LifecycleInterceptorHandler.postActivate(LifecycleInterceptorHandler.java:143)
           ... 103 more
      Caused by: org.jboss.serial.exception.SerializationException: Could not create instance of org.hibernate.ejb.QueryImpl - org.hibernate.ejb.QueryImpl
           at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:342)
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:239)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
           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:412)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
           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:412)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
           at org.jboss.serial.persister.ArrayPersister.readObjectArray(ArrayPersister.java:196)
           at org.jboss.serial.persister.ArrayPersister.readData(ArrayPersister.java:172)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
           at org.jboss.serial.io.JBossObjectInputStream.readObjectOverride(JBossObjectInputStream.java:163)
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:344)
           at org.jboss.serial.io.MarshalledObject.get(MarshalledObject.java:68)
           at org.jboss.ejb3.stateful.StatefulBeanContext.extractBeanAndInterceptors(StatefulBeanContext.java:793)
           ... 106 more
      Caused by: java.lang.InstantiationException: org.hibernate.ejb.QueryImpl
           at java.lang.Class.newInstance0(Class.java:340)
           at java.lang.Class.newInstance(Class.java:308)
           at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:334)
           ... 131 more