You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Jonathan Valliere (JIRA)" <ji...@apache.org> on 2019/05/24 13:13:00 UTC

[jira] [Updated] (DIRMINA-930) Problems with ObjectSerializationCodecFactory using MINA in between Java 6 and Java 7

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

Jonathan Valliere updated DIRMINA-930:
--------------------------------------
    Fix Version/s:     (was: 3.0.0-trunk)

> 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
>         Attachments: MinaClient.java, MinaServer.java, Server6Client7.txt, Server7Client6.txt
>
>
> 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/readClassDescriptor, therefore the problem does not exist there.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)