Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Failed to replicate non-serializable object

 
seema bhargava
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Here is the background.
Our application was working fine before. Now we are trying to migrate the application in Weblogic 6.1 clustered environment.
We are getting the following error :
All session objects should be serializable to replicate. Check the objects in your session. Failed to replicate non-serializable object.
We serialised all the classes realted to the functionality for which the error is coming same error is coming. Can somebody help urgently.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check again. At some point your application is attempting to place a non-serializable object in the HttpSession.
For an object to be truely serialiable (ie for it to serialize without error) then it must be marked Serializable and not contain any non-static or non-transient references to objects that are not serializable. Did that make sense???
BTW, the problem might not be in one of your classes, maybe somewhere a standard Java class which is not serializable (such as a java.sql.Connection) is being added to the HttpSession. You might want to register an HttpSessionAttributeListener to output the type of every object added to an HttpSession and whether or not it implements Serializable. This might help in identifying the cause of your problems.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic