0

We have two system one Running with JDK 1.6 and another with JDK 1.7. To communicate between the two node we are using ProtoStuff Serialization to convert binary & transfer to other node where its again the binary is de-serialized.

JDK 1.7 added new field 'suppressedExceptions', so now if we serialize the Throwable in JDK 1.7 in one node and transfer to another node its not able de-serialize & vice versa.

As two nodes uses different technology its not possible to migrate from JDK 1.6 to JDK 1.7 & JDK 1.7 to JDK 1.6.

Is there any solution to solve this problem, Thanks in advance for the reply.

With Regards, Pavan

Pavan
  • 1
  • 2

1 Answers1

0

Protostuff-runtime does not support backward compatibility between two class versions if new field is added to one of base classes. This is caused by tag shift - when you add new field to base classe, all tag numbers in the childred classes are shifted. So, in general, there is no good solution for your problem.

But if you switch encoding to json, then problem should disappear. With protostuff-json, fields are stored using their names (instead of tags), so adding new field in the middle of class hierarchy should not be a problem anymore.

Kostiantyn
  • 935
  • 8
  • 13