[jboss-user] [Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
Some code is calling HttpSession.setAttribute and passing a non-serializable attribute as the attribute value. In this case it looks to be a reference to the session itself. Suggest you write an javax.servlet.http.HttpSessionAttributeListener implementation and have it analyze (i.e. try to serialize) values as they are passed into the session. This will help you identify what code is passing in the offending value. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035730#4035730 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035730 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
Thanks alot for replying. i think this would be a nice suggestion, Stans. Will try this and get back to u. -Kishor. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035874#4035874 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035874 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
I tried but not solved. My login.jsp contains a class which is Serialized then also giving the above problem when i say localhost/timbermine Following are the steps which i followed... 1. Downloaded a fresh jboss-4.0.2. 2. copied all and saved as node1 3. Followed the steps given in site...http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBoss 4. Added project path in the uriworkermap.properties. 5. All is running on 8080 and node1 is on 8180 ports. My jar and war are deploying fine on both the server. Started the Apache server and when i say localhost/timbermine displays the above error. As i told my login.jsp contains a class which is Serialized and i am not setting any thing in the session in login.jsp file. Thanks in advance. -Kishor View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036269#4036269 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036269 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
And also when i set tag in web.xml then it displays that NotSerializableException message...The above message. I again tried step by step..i found here. Whar could be the reason? -Kishor. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036340#4036340 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036340 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
Did you create and deploy the HttpSessionAttributeListener? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036386#4036386 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036386 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
Yes, I created HttpSessionAttributeListener. It is displaying the names and values what ever i set in the session. In my case i am setting 2 things in the session in login page. 1. DMSession class which extends UserSession class which implements serializable. 2. A boolean variable in the DMSession's object as true. There is only HTML code to take user id and password for inputs. I started all on 8080 and node1 on 8180...Started nicely. Tested web-console displays both when refreshed. when i say localhost/timbermine, First request goes to all server. Value of boolean set in the session is true and when i enter details and submit, the second request goes to node1 now the value of boolean variable is false in node1 since the first request goes to all server.and displays the following error in node1 The boolean variable i am setting in the session is not replicating in the node1... In this first 2 lines are the values set in the session.. 10:21:23,976 INFO [STDOUT] [Sess Add] [EMAIL PROTECTED]: [EMAIL PROTECTED] 10:21:23,992 INFO [STDOUT] [Sess Add] [EMAIL PROTECTED]: ISFROMLOGIN=true 10:21:24,039 INFO [STDOUT] java.io.NotSerializableException: org.apache.catalina.session.StandardSessionFacade 10:21:24,039 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054) 10:21:24,039 INFO [STDOUT] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332) 10:21:24,039 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304) 10:21:24,039 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247) 10:21:24,039 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) 10:21:24,039 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) 10:21:24,054 INFO [STDOUT] at java.util.HashMap.writeObject(HashMap.java:978) 10:21:24,054 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 10:21:24,054 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 10:21:24,054 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 10:21:24,054 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324) 10:21:24,070 INFO [STDOUT] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809) 10:21:24,070 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296) 10:21:24,070 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247) 10:21:24,070 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) 10:21:24,070 INFO [STDOUT] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332) 10:21:24,070 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304) 10:21:24,085 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247) 10:21:24,085 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) 10:21:24,085 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) 10:21:24,085 INFO [STDOUT] at org.jboss.invocation.MarshalledValue.(MarshalledValue.java:57) 10:21:24,085 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.JBossCacheService.getMarshalledValue(JBossCacheService.java:538) 10:21:24,101 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.JBossCacheService.putSession(JBossCacheService.java:155) 10:21:24,117 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.SessionBasedClusteredSession.processSessionRepl(SessionBasedClusteredSession.java:161) 10:21:24,117 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:475) 10:21:24,117 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.JBossCacheManager.storeSession(JBossCacheManager.java:256) 10:21:24,117 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:38) 10:21:24,117 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:91) 10:21:24,117 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59) 10:21:24,117 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 10:21:24,117 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 10:21:24,117 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 10:21:24,117 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 10:21:24,132 I
[jboss-user] [Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
Your DmWebSession class must be your problem then. Saying it implements Serializable is insufficient; all of its fields must also implement Serializable or be declared transient. Somewhere in the DmWebSession's object graph there is a non-transient reference to the session itself (aka org.apache.catalina.session.StandardSessionFacade). StandardSessionFacade isn't serializable, so that won't work. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038717#4038717 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038717 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
Actually DMWebSession which extends UserSession is having inner classes. They are also Serialized. There are 4 to 5 inner classes and each inner class contains public static final String variables. Following is my DMWebSession classI am creating the object of this and calling from login.jsp and settirng true or false. --DMWebSession.java--- public class DmWebSession extends UserSession { private HttpSession session_; private static final String SESSION_MGR = "SESSION_MANAGER"; public static DmWebSession getDmWebSession(HttpSession session) { DmWebSession sessionMgr = null; sessionMgr = (DmWebSession) session.getAttribute(SESSION_MGR); if (sessionMgr == null) { sessionMgr = new DmWebSession(session); } return sessionMgr; } private DmWebSession(HttpSession session) { session.setAttribute(SESSION_MGR, this); session_ = session; } protected Object getAttribute(String key) { return session_.getAttribute(key); } protected void setAttribute(String key, Object value) { session_.setAttribute(key, value); } protected void removeAttribute(String key) { session_.removeAttribute(key); } public void invalidateSession() { session_.invalidate(); session_ = null; } public void removeSelectedItems() { //This class is also Serialized UtilitiesBean util = new UtilitiesBean(); util.cleanSession(session_); } } The classes which are imported is it necessary they should also be Serialized ? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038730#4038730 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038730 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
"[EMAIL PROTECTED]" wrote : Saying it implements Serializable is insufficient; all of its fields must also implement Serializable or be declared transient. Somewhere in the DmWebSession's object graph there is a non-transient reference to the session itself (aka org.apache.catalina.session.StandardSessionFacade). StandardSessionFacade isn't serializable, so that won't work. And here that ref is: | public class DmWebSession extends UserSession { | | private HttpSession session_; HttpSession is an interface; the actual class of the object is StandardSessionFacade. You can't hold a ref to the session in a session attribute. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038911#4038911 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038911 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
GREAT solution sir...it worksAs per your suggestions, i commented a line in the code. Now its not displaying the error. I changed CacheMode to REPL_SYNC in tc5-cluster-service.xml to check whether session is replicating or not. It waits for sometime and displays following in node1 14:01:53,218 WARN [ReplicationInterceptor] runPreparePhase() failed. Transaction is marked as rolled back org.jboss.cache.lock.TimeoutException: rsp=sender=kishor:2283, retval=null, received=false, suspected=false at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:2186) at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:2208) at org.jboss.cache.interceptors.ReplicationInterceptor.runPreparePhase(ReplicationInterceptor.java:485) at org.jboss.cache.interceptors.ReplicationInterceptor$SynchronizationHandler.beforeCompletion(ReplicationInterceptor.java:389) at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:77) at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java: What could be the reason? Done the settings are per the site... http://www.jboss.org/developers/projects/jboss/tc5-clustering.html waiting for reply.. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039155#4039155 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039155 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
This isn't going to solve your problem, but first, in the cache config file, make sure SyncReplTimeout is at least of few seconds longer than LockAcquisitionTimeout. If you do that, and you get the same exception (look at the details of the error message; it's important) then you need to start by debugging the connectivity between the servers. See http://wiki.jboss.org/wiki/Wiki.jsp?page=TestingJBoss[/url] and [url]http://www.jgroups.org/javagroupsnew/docs/newuser/node6.html. If you get an exception that talks about failure to acquire a lock, then make sure sticky sessions are working correctly. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039400#4039400 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039400 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user