This is hard to describe, so I hope I make this clear.
We compile a large application containing many EJB's and Java Swing client code into a typical class file hierarchy. We then build a .EAR containing all compiled classes and deploy the .EAR to Weblogic 12.2.1.3.
In Eclipse, we define a run configuration for the local Java Swing client. The run config classpath points to the local package root of the compiled classes on the development machine.
So we have (a) compiled class hierarchy; (b) the same classes deployed in an .EAR on the server.
We start Weblogic and then run the local Swing client.
Weblogic and the client run in different Java 8.x JVM's.
The local client calls Weblogic, causing remote JNDI lookup of EJB's.
Most of it works fine.
PROBLEM
We occasionally get a seemingly random error, for example:
[java] java.io.InvalidClassException: com.framework.SomeEjbImpl; local class incompatible: stream classdesc serialVersionUID = 6099783323740404732, local class serialVersionUID = -7124492888158518181
Note that the exception only occurs on EJB's which do not have an explicitly declared serialVersionUID.
If I add an ID to the failed class then recompile and redeploy, then some other EJB without a declared serialVersionUID will fail... a bump in the rug problem.
The problem might not appear for some time, then one day, it appears. After wasted hours of cursing recompiling and redeploying, it eventually hides for a while, only to appear maybe a week later. We have also tried cleaning out the cache and tmp folders in the Weblogic domain, then clean build, redeploy the .EAR. This seems to have no effect.
Having made no changes to the compiled classes, why is the serialVersionUID different between stream and local?