Marco Waimer created DIRMINA-930:
------------------------------------

             Summary: Problems with ObjectSerializationCodecFactory using MINA 
in between Java 6 and Java 7
                 Key: DIRMINA-930
                 URL: https://issues.apache.org/jira/browse/DIRMINA-930
             Project: MINA
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.0.7
         Environment: Windows 7, Java 7, Java 6
            Reporter: Marco Waimer
            Priority: Critical
             Fix For: 2.0.8


We use mina with the 
*org.apache.mina.filter.codec.serialization.ObjectSerializationCodecFactory* 
for our communication framework. Using Java 7 on one side (i.e. server) and 
Java 6 on the other side (i.e. client) leads to problems with the 
deserialisation, in our case with a *java.util.Locale* object, which has 
additional fields in Java 7. See attached stack traces.

We tracked the problem to 
*org.apache.mina.core.buffer.AbstractIoBuffer.putObject(Object)* and 
*org.apache.mina.core.buffer.AbstractIoBuffer.getObject(ClassLoader)*, since 
this part is overriding java serialisation and omitting some class information, 
which will be needed for the deserialisation. 

Using the attached example the stack traces could easily be reproduced, running 
one part with Java 7 and the other with Java 6. The _MinaServer_ will simply 
open a port and the _MinaClient_ will send a *java.util.Locale* object to that 
port.

In MINA 1.1.7 _ObjectOutputStream_ and _ObjectInputStream_ were used without 
overriding _writeClassDescriptor_, therefore the problem does not exist there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to