Skip to Content
0
Mar 04, 2020 at 08:53 PM

Clustering error java.io.NotSerializableException: java.lang.ref.WeakReference

110 Views

After Rolling update (session replication) configuration faced out with errors during session replication. There were plenty of errors in the console. Half of them were fixed by adding Serializable + UID for classes. But still, the console has errors (see below).

The main Issue is

INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 | java.io.NotSerializableException: java.lang.ref.WeakReference
| jvm 1    | main    | 2020/03/04 09:46:21.348 |   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.348 |     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.348 |     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.348 |     at java.lang.Thread.run(Thread.java:748)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.348 | 
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 | Mar 04, 2020 9:46:21 AM org.apache.catalina.ha.session.DeltaManager requestCompleted


START HERE

INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 | SEVERE: Unable to serialize delta request for sessionid [4DAA80172E8AA1BC6479A2C057D5AFB4]
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 | java.io.NotSerializableException: java.lang.ref.WeakReference
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.util.ArrayList.writeObject(ArrayList.java:766)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at sun.reflect.GeneratedMethodAccessor403.invoke(Unknown Source)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.lang.reflect.Method.invoke(Method.java:498)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1140)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.ha.session.DeltaRequest$AttributeInfo.writeExternal(DeltaRequest.java:407)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.ha.session.DeltaRequest.writeExternal(DeltaRequest.java:300)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.ha.session.DeltaRequest.serialize(DeltaRequest.java:314)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.ha.session.DeltaManager.serializeDeltaRequest(DeltaManager.java:584)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.ha.session.DeltaManager.requestCompleted(DeltaManager.java:967)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.ha.session.DeltaManager.requestCompleted(DeltaManager.java:935)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.ha.tcp.ReplicationValve.send(ReplicationValve.java:537)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.ha.tcp.ReplicationValve.sendMessage(ReplicationValve.java:524)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.ha.tcp.ReplicationValve.sendSessionReplicationMessage(ReplicationValve.java:506)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.ha.tcp.ReplicationValve.sendReplicationMessage(ReplicationValve.java:419)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:343)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1136)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
INFO   | jvm 1    | main    | 2020/03/04 09:46:21.548 |     at java.lang.Thread.run(Thread.java:748)
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)