1

I am getting below exception when I am doing clustering in Tomcat.

SEVERE: Unable to serialize delta request for sessionid [E67521E84EE07AB85E0243149B4DE472.jvm2] java.io.NotSerializableException: org.mybatis.spring.SqlSessionTemplate at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)

0

1 Answer 1

1

The Javadoc of the exception explains the meaning of the exception:

Thrown when an instance is required to have a Serializable interface. The serialization runtime or the class of the instance can throw this exception. The argument should be the name of the class.

https://docs.oracle.com/javase/7/docs/api/java/io/NotSerializableException.html

Somehow your program tries to write an instance of SqlSessionTemplate to an object stream (aka serialization), perhaps to send it over a network to a different machine.

Normally to fix this exception, you let a class implement the Serializable interface, but since this is a library class and it's not owned by you, it cannot be changed and hence it's not meant to be serialized.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.