Results 1 to 3 of 3
  1. #1
    Chinnu55 is offline Member
    Join Date
    Apr 2011
    Posts
    20
    Rep Power
    0

    Default Getting exception is java.io.NotSerializableException. Please help

    Hi,

    In server log file, I see this exception getting repeated.

    Please let me know why we are getting exception and how to resolve the issue

    Java Code:
    SessionContex E   Exception is: java.io.NotSerializableException: com.ibm.ontarget.data.CoverageItem
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled Code))
    	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Inlined Compiled Code))
    	at java.util.ArrayList.writeObject(ArrayList.java(Compiled Code))
    	at sun.reflect.GeneratedMethodAccessor324.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
    	at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
    	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java(Compiled Code))
    	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java(Compiled Code))
    	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java(Compiled Code))
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled Code))
    	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java(Inlined Compiled Code))
    	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java(Compiled Code))
    	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java(Compiled Code))
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled Code))
    	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled Code))
    	at com.ibm.ws.webcontainer.httpsession.BackedHashtableMR.handlePropertyHits(BackedHashtableMR.java(Compiled Code))
    	at com.ibm.ws.webcontainer.httpsession.BackedHashtable.persistSession(BackedHashtable.java(Compiled Code))
    	at com.ibm.ws.webcontainer.httpsession.BackedHashtable.ejbStore(BackedHashtable.java(Compiled Code))
    	at com.ibm.ws.webcontainer.httpsession.BackedHashtable.storeSession(BackedHashtable.java(Compiled Code))
    	at com.ibm.ws.webcontainer.httpsession.BackedHashtable.put(BackedHashtable.java(Compiled Code))
    	at com.ibm.ws.webcontainer.httpsession.DatabaseSessionContext.sync(DatabaseSessionContext.java(Compiled Code))
    	at com.ibm.ws.webcontainer.httpsession.SessionData.sync(SessionData.java(Inlined Compiled Code))
    	at com.ibm.ws.webcontainer.httpsession.DatabaseSessionData.sync(DatabaseSessionData.java(Compiled Code))
    	at com.ibm.ws.webcontainer.httpsession.DatabaseSessionContext.checkForSessionWrites(DatabaseSessionContext.java(Compiled Code))
    	at com.ibm.ws.webcontainer.httpsession.DatabaseSessionContext.asyncExternalWrite(DatabaseSessionContext.java(Compiled Code))
    	at com.ibm.ws.webcontainer.httpsession.SessionAlarmListener.alarm(SessionAlarmListener.java(Compiled Code))
    	at com.ibm.ejs.util.am._Alarm.run(_Alarm.java(Compiled Code))
    	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    Thanks,
    Chinnu

  2. #2
    JeffGrigg is offline Member
    Join Date
    Aug 2011
    Posts
    95
    Rep Power
    0

    Default

    Your code is storing non-serializable objects in session scope.

  3. #3
    perfect5085 is offline Member
    Join Date
    Aug 2011
    Location
    HangZhou, China
    Posts
    4
    Rep Power
    0

    Default

    if you want to save an object, please implements Serializable.

Similar Threads

  1. unreported exception java.lang.Exception
    By Marisabel in forum New To Java
    Replies: 6
    Last Post: 05-01-2011, 03:21 AM
  2. Replies: 5
    Last Post: 02-14-2011, 11:39 PM
  3. Replies: 2
    Last Post: 02-08-2011, 01:11 AM
  4. Replies: 4
    Last Post: 10-25-2010, 07:42 PM
  5. FileOutputStream gets NotSerializableException
    By xcallmejudasx in forum New To Java
    Replies: 0
    Last Post: 12-02-2008, 09:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •