[jboss-user] [JBoss Seam] - SerializationException on org.jboss.seam.core.Messages from

dbatcn do-not-reply at jboss.com
Fri Aug 11 19:29:31 EDT 2006


I'm getting a SerializationException on org.jboss.seam.core.Messages from my stateful session bean and it's quite unclear to me why or how.  I'm using Seam extended managed persistence. (Which is relevant or irrelevant?) Can anybody explain how this is possible?

code snippet


  | @Stateful
  | @Name("groupManager")
  | @LoggedIn
  | public class GroupManagerBean implements GroupManager, Serializable {
  |     
  |     @In(create=true)
  |     private EntityManager orgmobDatabase;
  |     
  |     @In(create=true) 
  |     private Map<String, String> messages;
  |     
  |     @In(create=true)
  |     private transient FacesMessages facesMessages;
  |     
  |     private transient Map<Locale,MembershipComparator> membershipComparatorMap;
  | 
  |     public GroupManagerBean() {
  |         initMembershipComparatorMap();
  |     }
  |     
  |     private void initMembershipComparatorMap() {
  |         membershipComparatorMap = new HashMap<Locale,MembershipComparator>();
  |     }
  |     
  |     private void readObject( ObjectInputStream in ) 
  |       throws IOException, ClassNotFoundException {
  |         in.defaultReadObject();
  |         initMembershipComparatorMap();
  |     }
  |     
  | }
  | 

I know I don't have an explicit serialVersionUID but I (naively?) didn't think that could make a difference since all I'm doing right now is repeatedly deploying my app to JBoss which only uses one compiler (1.5.0_07-b03, though I don't think that matters) and undeploys any previously installed version of my app.  I can show more code if that's needed.  The stack trace is:

anonymous wrote : 
  | 2006-08-11 15:31:21,265 DEBUG [org.hibernate.impl.SessionFactoryImpl] deserialized: 402881e40cff1c58010cff51838c0009
  | 2006-08-11 15:31:21,265 DEBUG [org.hibernate.impl.SessionFactoryObjectFactory] lookup: uid=402881e40cff1c58010cff51838c0009
  | 2006-08-11 15:31:21,265 DEBUG [org.hibernate.impl.SessionFactoryImpl] resolved SessionFactory by uid
  | 2006-08-11 15:31:21,265 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/member].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
  | javax.faces.el.EvaluationException: Exception while invoking expression #{groupManager.forceGroup}
  | 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
  | 	at org.jboss.seam.core.Pages.callAction(Pages.java:161)
  | 	at org.jboss.seam.core.Pages.callAction(Pages.java:143)
  | 	at org.jboss.seam.jsf.AbstractSeamPhaseListener.callPageActions(AbstractSeamPhaseListener.java:128)
  | 	at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:98)
  | 	at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:50)
  | 	at org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener.beforePhase(SeamExtendedManagedPersistencePhaseListener.java:38)
  | 	at org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersBefore(LifecycleImpl.java:520)
  | 	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:342)
  | 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
  | 	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.lang.RuntimeException: java.io.IOException
  | 	at org.jboss.ejb3.stateful.StatefulBeanContext.extractBeanAndInterceptors(StatefulBeanContext.java:365)
  | 	at org.jboss.ejb3.stateful.StatefulBeanContext.getInstance(StatefulBeanContext.java:309)
  | 	at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:75)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
  | 	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:188)
  | 	at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
  | 	at $Proxy444.forceGroup(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:585)
  | 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
  | 	... 30 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$DataContainerDirectInput.readObject(DataContainer.java:639)
  | 	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:411)
  | 	at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:81)
  | 	at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:639)
  | 	at org.jboss.serial.io.JBossObjectInputStream.readObjectOverride(JBossObjectInputStream.java:165)
  | 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:343)
  | 	at org.jboss.serial.io.MarshalledObject.get(MarshalledObject.java:68)
  | 	at org.jboss.ejb3.stateful.StatefulBeanContext.extractBeanAndInterceptors(StatefulBeanContext.java:342)
  | 	... 47 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.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:103)
  | 	... 61 more
  | Caused by: org.jboss.serial.exception.SerializationException: Could not create instance of org.jboss.seam.core.Messages$1 - org.jboss.seam.core.Messages$1
  | 	at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:327)
  | 	at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:239)
  | 	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$DataContainerDirectInput.readObject(DataContainer.java:639)
  | 	at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
  | 	at org.jboss.serial.persister.ObjectInputStreamProxy.defaultReadObject(ObjectInputStreamProxy.java:78)
  | 	at com.orgmob.member.GroupManagerBean.readObject(GroupManagerBean.java:135)
  | 	... 66 more
  | Caused by: java.lang.InstantiationException: org.jboss.seam.core.Messages$1
  | 	at java.lang.Class.newInstance0(Class.java:335)
  | 	at java.lang.Class.newInstance(Class.java:303)
  | 	at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:319)
  | 	... 73 more
  | 

I'm using Seam 1.0.1.GA and JBoss 4.0.4.GA from the JEMS installer.  My searching for other similar instances didn't turn didn't turn up ones like it.  I hope it's OK to post this here.

Thanks,
David

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964713#3964713

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964713



More information about the jboss-user mailing list