I\'ve implemented Serializable in class \'userInfo\'. Still I\'m getting exception. Here\'s the output console -
java.io.WriteAbortedException: writing aborted;
Without seeing your code, it's hard to know for sure, but the cause of this is almost always that your class has a field that is not serializable (or that contains an object that contains a field, ...). Everything in an object, including everything that the object references and everything that those objects reference, must be serializable to avoid the exception.
why I'm getting NotSerializableException exception though I've implemented 'Serializable'
You haven't.
java.io.NotSerializableException: chatservernazmus.User public class userInfo implements Serializable{ public class User{
The User class must be serializable as well.
Pass -Dsun.io.serialization.extendedDebugInfo=true to the JVM for tracking the exact cause for NotSerializableException.
Eg: Add SET CATALINA_OPTS=%CATALINA_OPTS% -Dsun.io.serialization.extendedDebugInfo=true in the startup.bat