[jboss-dev] Re: jboss remoting 2.2.0.SPx update

Ron Sigal ron.sigal at jboss.com
Thu May 10 22:43:07 EDT 2007


In my last e-mail I meant to forward a previous e-mail that explains 
what went wrong with InvocationMarshaller.  This is the reply to that 
e-mail from Dimitris:

> I tried a simple test in the normal testsuite and it works, so that 
> problem is most probably solved, hurray!!!
>
> Ron Sigal wrote:
> I see the source of the NotSerializableException.  I added read() and 
> write() methods to SerializableUnMarshaller and SerializableMarshaller 
> which take a third argument - the version.  This worked fine inside of 
> Remoting.  But I didn't realize that these classes are extended in 
> JBossAS.  What was happening was that the versioned write() calls were 
> going to SerializableMarshaller instead of the subclass 
> InvocationMarshaller, and the Invocation wasn't being transformed into 
> a serializable MarshalledInvocation.
>
> The compatibility tests with 4.2 <-> 4.2 now mostly pass, with a few 
> exceptions I don't understand: errors such as "ejbStore() should not 
> be invoked during ejbPostCreate()".  I've attached the html reports.
>
> I've checked in the updated marshallers/unmarshallers.
-------------------------------------------------------------------------
Brian Stansberry wrote:
> I'm not 100% sure, but I think the problem is right here:
>
> at 
> org.jboss.remoting.marshal.serializable.SerializableMarshaller.write(SerializableMarshaller.java:120) 
>
>     at 
> org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedWrite(MicroSocketClientInvoker.java:964) 
>
>     at 
> org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:554) 
>
>     at 
> org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122) 
>
>
>
> The Marshaller being used is SerializableMarshaller rather than its 
> subclass org.jboss.invocation.unified.marshall.InvocationMarshaller. 
> The subclass is the one that has the specialized logic to convert the 
> non-serializable Invocation to a serializable MarshalledInvocation.
>
> Don't know what it is that tells remoting to use InvocationMarshaller.
>
> - Brian
>
> Dimitris Andreadis wrote:
>>  > 1. I'm confused about the NotSerializableException -
>>  > org.jboss.invocation.Invocation in trunk/server/src/main really 
>> *isn't*
>>  > serializable. ???
>>
>> We just switched from jboss-remoting 2.2.0.SP2 to 2.2.0.SP4 without 
>> any other change that could affect the main testsuite. I understand 
>> the org.jboss.invocation.Invocation class was never Serializable 
>> because it is not sent over the network, it encapsulates the 
>> invocation as it goes through the interceptor chain.
>>
>> Can you try a simple test from the jboss as testsuite (Branch_4_2).
>>
>> Running any simple test, e.g.
>>
>> X:\cvs\jboss-public\jboss-4.2\testsuite>build one-test 
>> -Dtest=org.jboss.test.bank.test.BankStressTestCase
>>
>> shows on the server.log:
>>
>> 10:58:11,705 ERROR [ServerThread] Worker thread initialization 
>> failure java.io.EOFException
>>         at 
>> org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:522) 
>>
>>         at 
>> org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:365) 
>>
>>         at 
>> org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:161) 
>>
>>
>> and on the client side
>>
>> 2007-05-10 10:58:11,474 DEBUG [org.jboss.test.JBossTestCase$1] 
>> deployed package: bank.jar
>> 2007-05-10 10:58:11,474 INFO  
>> [org.jboss.test.bank.test.BankStressTestCase] Remove accounts
>> 2007-05-10 10:58:11,655 DEBUG 
>> [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] 
>> SocketClientInvoker[187c55c, socket://127.0.0.1:4446] setting 
>> enableTcpNoDelay to true
>> 2007-05-10 10:58:11,655 DEBUG 
>> [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] 
>> SocketClientInvoker[187c55c, socket://127.0.0.1:4446] constructed
>> 2007-05-10 10:58:11,655 DEBUG 
>> [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] 
>> SocketClientInvoker[187c55c, socket://127.0.0.1:4446] setting 
>> enableTcpNoDelay to true
>> 2007-05-10 10:58:11,655 DEBUG 
>> [org.jboss.remoting.MicroRemoteClientInvoker] 
>> SocketClientInvoker[187c55c, socket://127.0.0.1:4446] connecting
>> 2007-05-10 10:58:11,655 DEBUG 
>> [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] 
>> SocketClientInvoker[187c55c, socket://127.0.0.1:4446] added new pool 
>> ([]) as ServerAddress[127.0.0.1:4446, enableTcpNoDelay timeout 0 ms]
>> 2007-05-10 10:58:11,655 DEBUG 
>> [org.jboss.remoting.MicroRemoteClientInvoker] 
>> SocketClientInvoker[187c55c, socket://127.0.0.1:4446] connected
>> 2007-05-10 10:58:11,695 DEBUG 
>> [org.jboss.remoting.transport.socket.ClientSocketWrapper] reset 
>> timeout: 0
>> 2007-05-10 10:58:11,705 DEBUG 
>> [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] 
>> SocketClientInvoker[187c55c, socket://127.0.0.1:4446] got exception 
>> java.io.NotSerializableException: org.jboss.invocation.Invocation
>> 2007-05-10 10:58:11,705 DEBUG 
>> [org.jboss.remoting.transport.socket.SocketWrapper] unable to close 
>> output stream
>> 2007-05-10 10:58:11,705 DEBUG 
>> [org.jboss.remoting.transport.socket.SocketWrapper] 
>> ClientSocketWrapper[Socket[addr=/127.0.0.1,port=4446,localport=2788].10fe2b9] 
>> closing
>> 2007-05-10 10:58:11,705 ERROR 
>> [org.jboss.remoting.transport.socket.SocketClientInvoker] Got 
>> marshalling exception, exiting
>> java.io.NotSerializableException: org.jboss.invocation.Invocation
>>     at 
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
>>     at 
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375) 
>>
>>     at 
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>>     at 
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290) 
>>
>>     at 
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>>     at 
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
>>     at 
>> org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObjectVersion2_2(JavaSerializationManager.java:120) 
>>
>>     at 
>> org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObject(JavaSerializationManager.java:95) 
>>
>>     at 
>> org.jboss.remoting.marshal.serializable.SerializableMarshaller.write(SerializableMarshaller.java:120) 
>>
>>     at 
>> org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedWrite(MicroSocketClientInvoker.java:964) 
>>
>>     at 
>> org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:554) 
>>
>>     at 
>> org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122) 
>>
>>     at org.jboss.remoting.Client.invoke(Client.java:1550)
>>     at org.jboss.remoting.Client.invoke(Client.java:530)
>>     at 
>> org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.invoke(UnifiedInvokerProxy.java:175) 
>>
>>     at 
>> org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365) 
>>
>>     at 
>> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197) 
>>
>>     at 
>> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61) 
>>
>>     at 
>> org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
>>     at 
>> org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)
>>     at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
>>     at $Proxy1.findAll(Unknown Source)
>>     at 
>> org.jboss.test.bank.test.BankStressTestCase.setUp(BankStressTestCase.java:462) 
>>
>>     at junit.framework.TestCase.runBare(TestCase.java:128)
>>     at junit.framework.TestResult$1.protect(TestResult.java:106)
>>     at junit.framework.TestResult.runProtected(TestResult.java:124)
>>     at junit.framework.TestResult.run(TestResult.java:109)
>>     at junit.framework.TestCase.run(TestCase.java:120)
>>     at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>     at junit.framework.TestSuite.run(TestSuite.java:225)
>>     at junit.framework.TestSuite.runTest(TestSuite.java:230)
>>     at junit.framework.TestSuite.run(TestSuite.java:225)
>>     at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>>     at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>>     at junit.framework.TestResult.runProtected(TestResult.java:124)
>>     at junit.extensions.TestSetup.run(TestSetup.java:25)
>>     at 
>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297) 
>>
>>     at 
>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672) 
>>
>>     at 
>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567) 
>>
>>
>
>



More information about the jboss-development mailing list