Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
4.0.0
-
None
-
None
Description
In our setup, we have session persistence enabled (which serializes session data), and, in our tests, we've discovered the following problem:
Stack Dump = java.lang.ClassCastException: cannot assign instance of java.lang.invoke.SerializedLambda to field org.apache.myfaces.util.lang.LRULinkedHashMap.expiredCallback of type org.apache.myfaces.util.lang.SerializableConsumer in instance of org.apache.myfaces.util.l ang.LRULinkedHashMap at java.base/java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(Unknown Source) at java.base/java.io.ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(Unknown Source) at java.base/java.io.ObjectStreamClass.checkObjFieldValueTypes(Unknown Source) at java.base/java.io.ObjectInputStream$FieldValues.defaultCheckFieldValues(Unknown Source) at java.base/java.io.ObjectInputStream.readSerialData(Unknown Source) at java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.base/java.io.ObjectInputStream.readObject0(Unknown Source) at java.base/java.io.ObjectInputStream$FieldValues.<init>(Unknown Source) at java.base/java.io.ObjectInputStream.readSerialData(Unknown Source) at java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.base/java.io.ObjectInputStream.readObject0(Unknown Source) at java.base/java.io.ObjectInputStream$FieldValues.<init>(Unknown Source) at java.base/java.io.ObjectInputStream.readSerialData(Unknown Source) at java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.base/java.io.ObjectInputStream.readObject0(Unknown Source) at java.base/java.io.ObjectInputStream.readObject(Unknown Source) at java.base/java.io.ObjectInputStream.readObject(Unknown Source) at java.base/java.util.Hashtable.readHashtable(Unknown Source) at java.base/java.util.Hashtable.readObject(Unknown Source)
SerializedLambda JavaDoc:
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/invoke/SerializedLambda.html
Relevant Code: