[ https://issues.apache.org/jira/browse/EXTCDI-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978030#action_12978030 ]
Michael Schuetz commented on EXTCDI-118: ---------------------------------------- extract from weld-dev mailing list: Pete Muir: "Weird, I wonder what is trying to serialize a bean object, there is no spec requirement for these to be serializable. Can you find out?" ## Mark Struberg: "Hmm Beans are serialized all the day if you use a @ViewScoped context because the JSF ViewMap gets serialized/deserialized on every request. And the ViewScopeContext stores all the beans (+contextual instances, dependent objects, etc) in the ViewMap. I remember that this used to work in an earlier Weld version." ## Pete Muir: "Ok, so it sounds like a poor assumption by CODI that the Bean object is serializable. Michael, I suggest you file an issue in their issue tracker for this. Basically the issue is that the spec doesn't place any mandate on a PassivationCapable bean being serializable when passed to a Context impl. This is something we should definitely change in the spec (see CDI-24) as it's quite simple for the container to do for you, and something we can do in Weld for 1.2.0 (see WELD-793) but for CODI to be "spec compliant" for CDI 1.0 it does need to remove this assumption. NB OWB already does this hence why it works there." > Could not serialize state: org.jboss.weld.bean.ManagedBean > ---------------------------------------------------------- > > Key: EXTCDI-118 > URL: https://issues.apache.org/jira/browse/EXTCDI-118 > Project: MyFaces CODI > Issue Type: Bug > Affects Versions: 0.9.1, 0.9.2 > Environment: JbossAS6Final, MyFaces2, > jdk1.6_21, win7 64bit > Reporter: Michael Schuetz > > Having MyFaces configured now. > Getting following error: > 09:58:21,068 INFO [org.apache.myfaces.util.ExternalSpecifications] MyFaces > Unified EL support enabled > 09:58:21,209 INFO > [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myfaces-cdi-1.0.2-SNAPSHOT]] > No state saving method defined, assuming default server state saving > 09:58:28,820 SCHWERWIEGEND > [org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementHelper] > Exiting serializeView - Could not serialize state: > org.jboss.weld.bean.ManagedBean: java.io.NotSerializableException: > org.jboss.weld.bean.ManagedBean > at > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) > [:1.6.0_21] > at > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) > [:1.6.0_21] > at > java.util.concurrent.ConcurrentHashMap.writeObject(ConcurrentHashMap.java:1246) > [:1.6.0_21] > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > [:1.6.0_21] > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > [:1.6.0_21] > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > [:1.6.0_21] > at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21] > at > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) > [:1.6.0_21] > at > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) > [:1.6.0_21] > at > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) > [:1.6.0_21] > at > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) > [:1.6.0_21] > at > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) > [:1.6.0_21] > at java.util.HashMap.writeObject(HashMap.java:1001) [:1.6.0_21] > at sun.reflect.GeneratedMethodAccessor270.invoke(Unknown Source) > [:1.6.0_21] -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.