[
https://issues.jboss.org/browse/WELD-908?page=com.atlassian.jira.plugin.s...
]
Ales Justin resolved WELD-908.
------------------------------
Resolution: Incomplete Description
Random NPE while serializing bean sent
---------------------------------------
Key: WELD-908
URL:
https://issues.jboss.org/browse/WELD-908
Project: Weld
Issue Type: Bug
Affects Versions: 1.1.0.Final
Environment: Glassfish 3.1
Reporter: Yannick Menager
The problem happens randomly (like 50% of the time), when calling an EJB through it's
remote interface, and passing a Session scoped object as an argument, resulting in an
NPE:
java.lang.NullPointerException
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1088)
at java.io.ObjectOutputStream.writeUnshared(ObjectOutputStream.java:397)
at
org.jboss.weld.bean.proxy.util.SerializableProxy.writeObject(SerializableProxy.java:92)
at sun.reflect.GeneratedMethodAccessor125.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:646)
at
com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:612)
at
com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:196)
at
com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:235)
at
com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:216)
at
com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:180)
at
com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:852)
at
com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:837)
at
com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:962)
at
com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:976)
at
com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:521)
at com.sun.corba.ee.impl.corba.TCUtility.marshalIn(TCUtility.java:157)
at com.sun.corba.ee.impl.corba.AnyImpl.write_value(AnyImpl.java:627)
at
com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_any(CDROutputStream_1_0.java:627)
at
com.sun.corba.ee.impl.encoding.CDROutputObject.write_any(CDROutputObject.java:489)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:366)
at
com.sun.corba.ee.impl.io.ValueHandlerImpl.write_Array(ValueHandlerImpl.java:499)
at
com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:233)
at
com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:216)
at
com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:180)
at
com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:852)
at
com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeArray(CDROutputStream_1_0.java:768)
at
com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:949)
at
com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:976)
at
com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:521)
at
com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:76)
at
com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:65)
at
com.sun.corba.ee.impl.orbutil.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:69)
at
com.sun.corba.ee.impl.orbutil.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:59)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:771)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObjects(Util.java:742)
at
com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyArguments(DynamicMethodMarshallerImpl.java:439)
at
com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:227)
at
com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
------------------------------------------
import java.io.Serializable;
public class TestObj implements Serializable{
private String val;
public TestObj() {
}
public TestObj(String val) {
this.val = val;
}
public String getVal() {
return val;
}
public void setVal(String val) {
this.val = val;
}
}
------------------------------------------
@RequestScoped
@Named("test")
public class TestWeb {
@EJB
private RemoteService remoteService;
@Inject
private TestObj testObj;
@Produces
@SessionScoped
public TestObj create() {
return new TestObj("ads");
}
public String getVal() {
return remoteService.test(testObj);
}
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira