[
https://issues.apache.org/jira/browse/DIRMINA-930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marco Waimer updated DIRMINA-930:
---------------------------------
Description:
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.
was:
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.
> 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
>
> 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 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