IBM Support

Getting java.io.NotSerializableException when SessionObjectSize counter is enabled

Troubleshooting


Problem

When PMI (Performance Monitoring Infrastructure) is enabled with SessionObjectSize counter enabled, getting NotSerializableException. The SystemOut.log shows something similar to: [4/10/07 5:25:42:618 EDT] 00000091 SessionContex E Exception is: java.io.NotSerializableException: com.com1.dept.nls.model.someModel at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled Code)) ... at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(CompiledCode)) at com.ibm.ws.webcontainer.httpsession.SessionContextMBeanAdapter.getSessionsInfo(SessionContextMBeanAdapter.java(Compiled Code)) at com.ibm.ws.webcontainer.httpsession.SessionTrackingPMIApplicationData$1.getRuntimeInfo(SessionTrackingPMIApplicationData.java(Inlined Compiled Code)) ... at com.ibm.ws.pmi.server.modules.ServletSessionsModule$SessionObjSize.updateStatistic(ServletSessionsModule.java(Compiled Code)) at com.ibm.ws.pmi.server.data.SpdStatExternal.updateExternal(SpdStatExternal.java(Compiled Code)) at com.ibm.websphere.pmi.server.PmiAbstractModule.update(PmiAbstractModule.java(Compiled Code)) ... The error does not affect application functionality. Disabling SessionObjectSize counter makes the error stop occurring.

Cause

WebSphere® Application Server Session Manager throws NotSerializableException when it tries to serialize non-serializable SessionData from the application before sending it to PMI.

Resolving The Problem

The application needs to ensure there is no session object that is not serializable. The object needs to implement java™.io.Serializable interface.

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"PMI\/Performance Tools","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"6.0;5.1","Edition":"Base;Network Deployment;Single Server","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

53925;L6Q;000

Document Information

Modified date:
15 June 2018

UID

swg21268440