Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlowExecutionImpl does not have the serialVersionUID defined [SWF-1737] #912

Open
spring-operator opened this issue Jul 10, 2019 · 2 comments
Labels
status: waiting-for-triage We need additional information before we can continue

Comments

@spring-operator
Copy link
Contributor

Nate Margono opened SWF-1737 and commented

I'm running into an issue that's awfully similar to SPR-4826. This is a blocker for my application's new release as well.

My issue is upgrading from spring-webflow 2.0.9.RELEASE to 2.3.4.RELEASE, and my previously existing snapshots can no longer be loaded/deserialized/unmarshalled:

java.io.InvalidClassException: org.springframework.webflow.engine.impl.FlowExecutionImpl; local class incompatible: stream classdesc serialVersionUID = 507164007291131518, local class serialVersionUID = -4659689664429207075

So I tried to approach it by hardcoding private static final long serialVersionUID = -4659689664429207075L; just like the fix for SPR-4826, but it's still throwing the same error, so maybe I missed a class/step?

It's noteworthy that the snapshots that were serialized in 2.0.9 were done by JDK 1.6, whereas the upgraded 2.3.4 is with JDK 1.8, which explains the differently generated serialVersionUID, as FlowExecutionImpl.java doesn't have a serialVersionUID harcoded - ergo, the JDK has to auto generate one.

But, for backward compatibility in the spring-webflow upgrade, shouldn't the snapshots still be able to be loaded/deserialized in the later version?

What's my best option to approach this?


Affects: 2.3.4

Reference URL: spring-projects/spring-framework#9502

@spring-operator
Copy link
Contributor Author

spring-operator commented Jul 13, 2019

Nate Margono commented

I was able to get past the serialVersionUID by hardcoding the value 507164007291131518 in the FlowExecutionImpl class (adapted from SPR-4826).

But I'm not faced with a serialization issue for FlowExecutionStatus, and I traced it back to #1774, where it's been changed from a StaticLabeledEnum to a Java enum. So, I'm getting a deserialization issue: "Caused by: java.io.InvalidClassException: cannot bind non-enum descriptor to an enum class", as expected.

But, that still leaves me with a lot of snapshots that were serialized as StaticLabeledEnum, and now not deserializable because of it. What is the best way to upgrade/restore these snapshots?

@spring-operator
Copy link
Contributor Author

Nate Margono commented

Can I get some help on this? It's a blocker for us and it requires us to modify the webflow JAR to get it to work, but we can't deliver it officially because of the modification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage We need additional information before we can continue
Projects
None yet
Development

No branches or pull requests

1 participant