[JBoss JIRA] Created: (JBAOP-347) ClassCastException in MarshalledValue.java
by Tim McCune (JIRA)
ClassCastException in MarshalledValue.java
------------------------------------------
Key: JBAOP-347
URL: http://jira.jboss.com/jira/browse/JBAOP-347
Project: JBoss AOP
Issue Type: Patch
Security Level: Public (Everyone can see)
Affects Versions: 1.5.3.GA
Environment: JBoss 4.0.4, Whatever version of JBossAOP is bundled in with JBoss EJB 3.0-RC9-FD, JDK 1.6
Reporter: Tim McCune
I tried enabling JBoss serialization with EJB 3 remoting for the first time today, by changing the line
<attribute name="InvokerLocator">socket://${jboss.bind.address}:3873</attribute>
to
<attribute name="InvokerLocator">socket://${jboss.bind.address}:3873/?serializationtype=jboss</attribute>
in ejb3.deployer/META-INF/jboss-service.xml. When I do this, any remote call to my EJB results in the following exception on the client:
java.lang.ClassCastException: org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput
at org.jboss.aop.util.MarshalledValue.writeExternal(MarshalledValue.java:190)
at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
at org.jboss.aop.metadata.SimpleMetaData.writeExternal(SimpleMetaData.java:226)
at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
at org.jboss.aop.joinpoint.MethodInvocation.writeExternal(MethodInvocation.java:321)
at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
at org.jboss.remoting.serialization.impl.jboss.JBossSerializationManager.sendObject(JBossSerializationManager.java:87)
at org.jboss.remoting.marshal.serializable.SerializableMarshaller.write(SerializableMarshaller.java:84)
at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:273)
at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
at org.jboss.remoting.Client.invoke(Client.java:525)
at org.jboss.remoting.Client.invoke(Client.java:488)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessClusteredProxy.invoke(StatelessClusteredProxy.java:100)
...
Looking at the code for MarshalledValue.java in the writeExternal method, the following line casts the ObjectOutput parameter to an OutputStream in order to take advantage of ByteArrayOutputStream's writeTo method:
baos.writeTo((OutputStream)out);
However, the assumption that the "out" parameter may be cast to an OutputStream in not a valid one. When using jboss serialization instead of java serialization, the "out" parameter that is passed in is of type org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput, which implements ObjectOutput, but does not extends OutputStream. A simple fix is to change the line above to:
out.write(baos.toByteArray());
I don't know if the writeTo method gives noticeably better performance. If it does, it might be worth it to do an instanceof check first.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 10 months
[JBoss JIRA] Created: (JBCACHE-711) Replication eats out exception on the remote node
by Ben Wang (JIRA)
Replication eats out exception on the remote node
-------------------------------------------------
Key: JBCACHE-711
URL: http://jira.jboss.com/jira/browse/JBCACHE-711
Project: JBoss Cache
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Replication
Affects Versions: 1.4.0
Reporter: Ben Wang
Assigned To: Manik Surtani
Fix For: 2.0.0
I have seen this on the 1.4 release on ejb3. Here is what happens. Two nodes replication. When the remote node throws an exception like NPE, the originating node will display with NonSerializableException. I don't a unit test for this but I think it should be easy to reproduce.
21:51:32,490 INFO [TxInterceptor] There was a problem handling this request
java.io.NotSerializableException: RpcDispatcher returned a null. This is most often caused by args for _replicate(_put(null, /testNestedStateful/5c4o1e-xzw6rx-eq1m0jea-1-eq1m4tna-5, bean, org.jboss.ejb3.stateful.ProxiedStatefulBeanContext@7b8be7, true)) not being serializable.
at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:4166)
at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:4113)
at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:4214)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:110)
at org.jboss.cache.interceptors.BaseRpcInterceptor.replicateCall(BaseRpcInterceptor.java:88)
at org.jboss.cache.interceptors.ReplicationInterceptor.handleReplicatedMethod(ReplicationInterceptor.java:114)
at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:83)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.PassivationInterceptor.invoke(PassivationInterceptor.java:69)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterce
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months
[JBoss JIRA] Created: (BPEL-235) Clean up composite activities
by Alejandro Guizar (JIRA)
Clean up composite activities
-----------------------------
Key: BPEL-235
URL: http://jira.jboss.com/jira/browse/BPEL-235
Project: JBoss jBPM BPEL
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Engine
Affects Versions: jBPM BPEL 1.1 beta 3
Reporter: Alejandro Guizar
Assigned To: Alejandro Guizar
Fix For: jBPM BPEL 1.1.GA
Implementation of NodeCollection methods in CompositeActivity subclasses is:
a) incorrect, some methods are broken and some allow things they shouldn't
b) inefficient, the underlying data structures are not exploited
c) incoherent, the view presented by the NodeCollection interface does not match the picture presented by concrete methods in CompositeActivity subclasses
Furthermore, method overriding is abused, resulting in a hard-to-understand hierarchy. Review overrides to determine if a better approach exist.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months