Are you saying you made serialVersionUID a mutable field and are setting it to one on some instances of the class? That won't work; the java io classes (not JBoss) compare the value read from the stream to the value of the Class object.
No, it is not mutable. The serialized classes contain this code generated by the JAXB compiler:
private final static long serialVersionUID = 1L;
The classes seem to be getting stored with this UID but not extracted that way.
I suspect you have different versions of the class on the classpath.
Caused by: java.io.InvalidClassException: com.company.generated.MyNode; local class incompatible: stream classdesc serialVersionUID = 1, local class serialVersionUID = -7258818124315218931
JBoss is not generating that local class serialVersionUID = -7258818124315218931; that comes from the JRE, which must be seeing a different version of the class.
Yep. You nailed it. I discovered that I had an old version of the WAR file still in JBoss's deploy directory. Somehow JBoss was inserting the newer file into JBC but using the older class when pulling it out. I removed the old WAR file and everything seems to be working fine. Thanks!