You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org> on 2011/01/06 18:20:45 UTC

[jira] Resolved: (EXTCDI-118) Could not serialize state: org.jboss.weld.bean.ManagedBean

     [ https://issues.apache.org/jira/browse/EXTCDI-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerhard Petracek resolved EXTCDI-118.
-------------------------------------

    Resolution: Won't Fix

to keep it more polite than pete does: ;)
due to a current weld bug instances of Bean and CreationalContext aren't serializable. it worked in the past and hopefully they will fix it.
esp. their implementation of CreationalContext implements Serializable but as soon as it isn't used as transient ref.var. it causes a NotSerializableException.
also std. cdi constellations lead to a NotSerializableException with weld (v1.0.1) - example:

public class SessionBeanProducer {

@Produces
@SessionScoped
@Named("testBean")
public TestBean createTestBean() {
return new TestBean("test bean");
}
}

public class TestBean implements Serializable {

private String value;

public TestBean() {
}

public TestBean(String value) {
this.value = value;
}
//+ getter/setter methods
} 

we already have workarounds for weld bugs - currently it isn't planned to add further workarounds for the combination (weld and jboss-as6) because it's clearly a rudimentarily weld bug btw. a 2nd question is why jboss-as6 triggers the serialization.

> 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.