aspose file tools*
The moose likes JBoss/WildFly and the fly likes NotSerializableException while Jboss clustering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Reply locked New topic
Author

NotSerializableException while Jboss clustering

Srikanth Adapa
Ranch Hand

Joined: Aug 21, 2008
Posts: 56
Hi all ,

I am trying to cluster an application in jboss 4.2.2GA , for which I am getting a NotSerializable exception as follows:


java.io.NotSerializableException: nextapp.echo2.webrender.Connection
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1527)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1492)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1410)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1168)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1527)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1492)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1410)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1168)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
at java.util.concurrent.ConcurrentHashMap.writeObject(ConcurrentHashMap.java:1284)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:623)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:963)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1479)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1410)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1168)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
at org.jboss.web.tomcat.service.session.SessionBasedClusteredSession.writeExternal(SessionBasedClusteredSession.java:175)
at org.jboss.web.tomcat.service.session.JBossCacheService.externalizeSession(JBossCacheService.java:1027)
at org.jboss.web.tomcat.service.session.JBossCacheService.putSession(JBossCacheService.java:316)
at org.jboss.web.tomcat.service.session.JBossCacheClusteredSession.processSessionRepl(JBossCacheClusteredSession.java:121)
at org.jboss.web.tomcat.service.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:1097)
at org.jboss.web.tomcat.service.session.JBossCacheManager.storeSession(JBossCacheManager.java:652)
at org.jboss.web.tomcat.service.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:49)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:98)
at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:84)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:675)


I am unable to understand why am I getting this exception stack trace.
Please respond me if any one have any idea about this.


Thank you
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9318
    
109

java.io.NotSerializableException: nextapp.echo2.webrender.Connection


You probably have this object in the session and when the session is being serialized, its throwing this exception because this object is not serializable (does not implement java.io.Serializable).


[My Blog] [JavaRanch Journal]
Srikanth Adapa
Ranch Hand

Joined: Aug 21, 2008
Posts: 56
Hi,

Basically, I am using the Echo2 jars in my applications, of which the Connection class belongs to those. I have modified that Connection class making it to implement Serializable interface. Now, I got a new stacktrace pointing to RequestFacade.java




And I also found that "org.apache.catalina.connector.RequestFacade" is found at "/jboss-4.2.2.GA-src/thirdparty/jboss/web/lib/jbossweb-src/org/apache/catalina/connector" package. But I am not finding way how to avoid this exception.


Please let me know if any of you have ever tried with clustering jboss!! I hope many of you actively participate in this discussion.


Thank you!!
Sri.
[ August 26, 2008: Message edited by: Ulf Dittmer ]
Srikanth Adapa
Ranch Hand

Joined: Aug 21, 2008
Posts: 56
Hi,

Here is the test case I am testing with. You can please suggest me accordingly.





Thank you!!

Sri
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NotSerializableException while Jboss clustering
 
Similar Threads
NotSerializableException while Jboss clustering
Failed to marshal exception problem
Enabling session replication does not work jboss 4.3 EAP
Inter servlet communication by means of session
Clustering an application by jboss produced this: