6 Replies Latest reply on Mar 6, 2007 3:43 PM by Kenneth Christensen

    Could not create instance of org.jboss.seam.persistence.Enti

    Kenneth Christensen Novice

      An exception is thrown when I hit the database after some time (e.g. 10 minutes):

      19:23:31,355 ERROR [STDERR] javax.faces.el.EvaluationException: java.lang.RuntimeException: org.jboss.serial.exception.SerializationException: Could not create instance of org.jboss.seam.persistence.EntityManagerProxy - org.jboss.seam.persistence.EntityManagerProxy
      19:23:31,355 ERROR [STDERR] at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
      19:23:31,356 ERROR [STDERR] at com.sun.j2ee.blueprints.ui.autocomplete.AutoCompletePhaseListener.getCompletionItems(AutoCompletePhaseListener.java:106)
      19:23:31,356 ERROR [STDERR] at com.sun.j2ee.blueprints.ui.autocomplete.AutoCompletePhaseListener.handleAjaxRequest(AutoCompletePhaseListener.java:58)
      19:23:31,356 ERROR [STDERR] at com.sun.j2ee.blueprints.ui.autocomplete.AutoCompletePhaseListener.afterPhase(AutoCompletePhaseListener.java:33)
      19:23:31,356 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:254)
      19:23:31,356 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
      19:23:31,356 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
      19:23:31,357 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      19:23:31,357 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      19:23:31,357 ERROR [STDERR] at teamdev.jsf.util.ResourceFilter.doFilter(SourceFile:67)
      19:23:31,357 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      19:23:31,358 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      19:23:31,358 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
      19:23:31,358 ERROR [STDERR] at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
      19:23:31,358 ERROR [STDERR] at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
      19:23:31,358 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      19:23:31,358 ERROR [STDERR] at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
      19:23:31,358 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      19:23:31,359 ERROR [STDERR] at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      19:23:31,359 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      19:23:31,359 ERROR [STDERR] at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      19:23:31,359 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      19:23:31,359 ERROR [STDERR] at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
      19:23:31,359 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      19:23:31,360 ERROR [STDERR] at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
      19:23:31,360 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      19:23:31,360 ERROR [STDERR] at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
      19:23:31,360 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      19:23:31,360 ERROR [STDERR] at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
      19:23:31,360 ERROR [STDERR] at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
      19:23:31,360 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      19:23:31,360 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      19:23:31,361 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      19:23:31,361 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      19:23:31,361 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      19:23:31,361 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      19:23:31,361 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      19:23:31,362 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      19:23:31,362 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      19:23:31,363 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      19:23:31,363 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      19:23:31,363 ERROR [STDERR] at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      19:23:31,363 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      19:23:31,363 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      19:23:31,363 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      19:23:31,363 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      19:23:31,363 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      19:23:31,363 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      19:23:31,364 ERROR [STDERR] at java.lang.Thread.run(Thread.java:613)
      19:23:31,364 ERROR [STDERR] Caused by: java.lang.RuntimeException: org.jboss.serial.exception.SerializationException: Could not create instance of org.jboss.seam.persistence.EntityManagerProxy - org.jboss.seam.persistence.EntityManagerProxy
      19:23:31,364 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulBeanContext.extractBeanAndInterceptors(StatefulBeanContext.java:367)
      19:23:31,364 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulBeanContext.getInstance(StatefulBeanContext.java:309)
      19:23:31,364 ERROR [STDERR] at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:61)
      19:23:31,364 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.invokePostActivate(StatefulContainer.java:373)
      19:23:31,365 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulBeanContext.postActivate(StatefulBeanContext.java:183)
      19:23:31,365 ERROR [STDERR] at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:312)
      19:23:31,365 ERROR [STDERR] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:265)
      19:23:31,365 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:61)
      19:23:31,365 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      19:23:31,365 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      19:23:31,365 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
      19:23:31,365 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      19:23:31,365 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      19:23:31,365 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      19:23:31,365 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      19:23:31,365 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      19:23:31,366 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
      19:23:31,366 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
      19:23:31,366 ERROR [STDERR] at $Proxy125.findName(Unknown Source)
      19:23:31,366 ERROR [STDERR] at com.mediatorsystems.workoutjournal.service.FoodLocal$$FastClassByCGLIB$$2e9d03ea.invoke(<generated>)
      19:23:31,366 ERROR [STDERR] at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      19:23:31,366 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
      19:23:31,366 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:74)
      19:23:31,366 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
      19:23:31,366 ERROR [STDERR] at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
      19:23:31,366 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
      19:23:31,366 ERROR [STDERR] at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:31)
      19:23:31,366 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
      19:23:31,366 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
      19:23:31,367 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:52)
      19:23:31,367 ERROR [STDERR] at org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$9b45d8ca.findName(<generated>)
      19:23:31,367 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      19:23:31,367 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      19:23:31,367 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      19:23:31,367 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      19:23:31,367 ERROR [STDERR] at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
      19:23:31,367 ERROR [STDERR] ... 48 more
      19:23:31,367 ERROR [STDERR] Caused by: org.jboss.serial.exception.SerializationException: Could not create instance of org.jboss.seam.persistence.EntityManagerProxy - org.jboss.seam.persistence.EntityManagerProxy
      19:23:31,368 ERROR [STDERR] at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:342)
      19:23:31,368 ERROR [STDERR] at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:239)
      19:23:31,368 ERROR [STDERR] at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
      19:23:31,368 ERROR [STDERR] at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
      19:23:31,368 ERROR [STDERR] at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
      19:23:31,368 ERROR [STDERR] at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
      19:23:31,368 ERROR [STDERR] at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
      19:23:31,368 ERROR [STDERR] at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
      19:23:31,369 ERROR [STDERR] at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
      19:23:31,369 ERROR [STDERR] at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
      19:23:31,369 ERROR [STDERR] at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
      19:23:31,369 ERROR [STDERR] at org.jboss.serial.persister.ArrayPersister.readObjectArray(ArrayPersister.java:196)
      19:23:31,369 ERROR [STDERR] at org.jboss.serial.persister.ArrayPersister.readData(ArrayPersister.java:172)
      19:23:31,369 ERROR [STDERR] at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
      19:23:31,369 ERROR [STDERR] at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
      19:23:31,369 ERROR [STDERR] at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
      19:23:31,370 ERROR [STDERR] at org.jboss.serial.io.JBossObjectInputStream.readObjectOverride(JBossObjectInputStream.java:163)
      19:23:31,370 ERROR [STDERR] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:342)
      19:23:31,370 ERROR [STDERR] at org.jboss.serial.io.MarshalledObject.get(MarshalledObject.java:68)
      19:23:31,370 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulBeanContext.extractBeanAndInterceptors(StatefulBeanContext.java:342)
      19:23:31,370 ERROR [STDERR] ... 83 more
      19:23:31,370 ERROR [STDERR] Caused by: java.lang.InstantiationException: org.jboss.seam.persistence.EntityManagerProxy
      19:23:31,370 ERROR [STDERR] at java.lang.Class.newInstance0(Class.java:335)
      19:23:31,370 ERROR [STDERR] at java.lang.Class.newInstance(Class.java:303)
      19:23:31,371 ERROR [STDERR] at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:334)
      19:23:31,371 ERROR [STDERR] ... 102 more
      19:24:15,284 DEBUG [FoodBean] Prefix: Category: null Fetch Data Size: 15 Paging Index: 0
      19:24:15,285 INFO [STDOUT] Hibernate: select count(foodname0_.id) as col_0_0_ from food_name foodname0_, food food1_ where foodname0_.language=? and (lower(foodname0_.name) like ? or upper(foodname0_.name) like ?) and foodname0_.food_id=food1_.food_id and (food1_.user_id is null or food1_.user_id=? or foodname0_.food_id=(select food2_.food_id from food food2_, userx user3_ where food2_.user_id=user3_.id and user3_.DISCRIMINATOR='FoodSponsor'))
      19:24:15,295 INFO [STDOUT] Hibernate: select foodname0_.id as id8_, foodname0_.name as name8_, foodname0_.language as language8_, foodname0_.food_id as food4_8_ from food_name foodname0_, food food1_ where foodname0_.language=? and (lower(foodname0_.name) like ? or upper(foodname0_.name) like ?) and foodname0_.food_id=food1_.food_id and (food1_.user_id is null or food1_.user_id=? or foodname0_.food_id=(select food2_.food_id from food food2_, userx user3_ where food2_.user_id=user3_.id and user3_.DISCRIMINATOR='FoodSponsor')) order by foodname0_.name asc limit ?
      19:24:15,299 DEBUG [FoodBean] Found 0 food name(s) with prefix: Category: null
      19:24:16,311 DEBUG [FoodBean] Prefix: % Category: null Fetch Data Size: 15 Paging Index: 0
      19:24:16,313 INFO [STDOUT] Hibernate: select count(foodname0_.id) as col_0_0_ from food_name foodname0_, food food1_ where foodname0_.language=? and (lower(foodname0_.name) like ? or upper(foodname0_.name) like ?) and foodname0_.food_id=food1_.food_id and (food1_.user_id is null or food1_.user_id=? or foodname0_.food_id=(select food2_.food_id from food food2_, userx user3_ where food2_.user_id=user3_.id and user3_.DISCRIMINATOR='FoodSponsor'))
      19:24:16,318 INFO [STDOUT] Hibernate: select foodname0_.id as id8_, foodname0_.name as name8_, foodname0_.language as language8_, foodname0_.food_id as food4_8_ from food_name foodname0_, food food1_ where foodname0_.language=? and (lower(foodname0_.name) like ? or upper(foodname0_.name) like ?) and foodname0_.food_id=food1_.food_id and (food1_.user_id is null or food1_.user_id=? or foodname0_.food_id=(select food2_.food_id from food food2_, userx user3_ where food2_.user_id=user3_.id and user3_.DISCRIMINATOR='FoodSponsor')) order by foodname0_.name asc limit ?
      19:24:16,326 DEBUG [FoodBean] Found 1032 food name(s) with prefix: % Category: null
      


      It works fine if I try again.

      The problem only occur after some time - i.e. no database hits for some time. I don't know the exact time the system must be idle before the exception occur, maybe >5 minutes.

      Any explanation?