I am trying to migrate my application, which runs on jboss 6.0.0-Final, from jdk 8u311 to jdk 8u401.
I see there are some changes in the readObject method of Hashmap and HashTable to call readFields instead of defaultReadObject.
It results in below error
Caused by: org.jboss.serial.exception.SerializationException: Excepted to be String
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readUTF(DataContainer.java:1120) [:6.0.0.Final]
at org.jboss.serial.persister.ObjectInputStreamProxy.readUTF(ObjectInputStreamProxy.java:196) [:6.0.0.Final]
at org.jboss.serial.objectmetamodel.FieldsContainer.readField(FieldsContainer.java:147) [:6.0.0.Final]
at org.jboss.serial.objectmetamodel.FieldsContainer.readMyself(FieldsContainer.java:218) [:6.0.0.Final]
at org.jboss.serial.persister.ObjectInputStreamProxy.readFields(ObjectInputStreamProxy.java:224) [:6.0.0.Final]
at java.util.HashSet.readObject(HashSet.java:298) [:1.8.0_401]
… 98 more
Caused by: java.lang.ClassCastException: org.jboss.serial.finalcontainers.FloatContainer cannot be cast to java.lang.String
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readUTF(DataContainer.java:1116) [:6.0.0.Final]
… 103 more
This occurs when returning a Serilizable object after performing DAO layer operations.
I see the jboss version compatible with jdk 8 is 6.3.4 and up
Anyway to get it working with 6.0.0-Final?
Tried setting -Djboss.remoting.preferJDKMarshalling=true and -Dserialization.jboss=false but it didnt help.
Also implemented readObject method in my class but it still defaults to HashMap/HashSet readObject when serializing.
Tried finding jboss-serialization version compatible with jdk 8u401. Currently using 4.2.2 GA
Cruxon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.