[Clustering/JBoss] - problems with session replication
by ddai
I followed the steps in document and Wiki in doing this but it just doesn't work to me at all. I an just wondering if I missed something.
First of all, the sticky session part is working perfectly for me. So I think I set the loadbalancer correctly
Then, I changed the sticiky session varaible in the worker.propties to 0, added the tag to the web.xml and created the jboss-web.xml in web-inf. Here is what that fille looks like:
------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<replication-config>
<replication-granularity>SESSION</replication-granularity>
<replication-trigger>SET_AND_NON_PRIMITIVE_GET</replication trigger>
</replication-config>
</jboss-web>
------------------------------------------------------------------------------
Is it all I need to do? Did I get them right?
Then I started two JBoss servers on two separate machines and run the application. 3 kinds of problems show up.
1. It seems all the requests only go to one server while leave the other one untouched.
2. "Session Expire"
I still cannot get rid of it. Isn't the session information supposed to be duplicated across all the nodes within the same cluster this time?? What makes thing worse is that the problem pops up irregularly. Sometimes, it shows up right after I log in. Sometimes, it looks good for the first several steps, but it still shows up in the end. It is totally irregular so that I have no clue how to track down the problem
3. Exceptions
Sometime before the session expires, a webpage showing all the exceptions will show up. The exceptions are like:
------------------------------------------------------------------------------
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: setAttribute: Non-serializable attribute
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
InputValidationFilter.doFilter(InputValidationFilter.java:54)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute
org.jboss.web.tomcat.tc5.session.ClusteredSession.setAttribute(ClusteredSession.java:532)
org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:129)
org.apache.jsp.gcsMenu_jsp._jspService(gcsMenu_jsp.java:450)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
InputValidationFilter.doFilter(InputValidationFilter.java:54)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
Apache Tomcat/5.5.20
-----------------------------------------------------------------------------------
My JBoss version is 4.0.5GA. My web server is IIS v 6.0.
I would say I have killed myself doing this these days. I am a new comer to JBoss, so any clue on what's happening here will be highly appreciated.
Thanks!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057501#4057501
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057501
18Â years, 10Â months
[JBoss Seam] - How to run a page action only once? or How to maintain the c
by grettke_spdr
Hi folks,
We've got a single requirement in our app where the user can come in on a RESTful URL. The idea is that they make a request and then leave, there is no more interaction. Originally I set this up as a single page with an action. However, I didn't know how to specify that the action only be executed once, so it got run each time the page was submitted after validation errors for example. I ended up coding around it by maintaining state in the component, but that was hacky, as the component didn't need to maintain anything beyond page conversations.
My solution was to create a restful url whose sole purpose in life is to jumpstart a component only once:
| <page view-id="/prepareInspectionRequest.xhtml"
| action="#{inspectionRequestAction.preparePage}">
| <param name="accountNumber"
| value="#{inspectionRequestForm.accountNumber}"/>
| <param name="userProfile"
| value="#{inspectionRequestForm.userProfile}"/>
|
| <navigation from-action="#{inspectionRequestAction.preparePage}">
| <rule if="#{inspectionRequestAction.validRequest}">
| <redirect view-id="/inspectionRequest.xhtml"/>
| </rule>
| <rule if="#{not inspectionRequestAction.validRequest}">
| <redirect view-id="/message.xhtml"/>
| </rule>
| </navigation>
| </page>
|
Is this the best approach?
The conversation scopes of these components defaults to page, which could be fine. After the redirect, the component has lost its state. How to redirect and maintain "page conversation" state.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057500#4057500
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057500
18Â years, 10Â months
[JBossCache] - NoClassDefFoundError with TreeCache on JBoss 4.2
by tazman
Hi,
when I click on "service=TreeCache-Cluster" link under "jboss.cache" in JMX console, I get a NoClassDefFoundError.
I just copied my whole JBoss 4.2 installation from my windows dev machine to the linux server. Everything works perfectly, even TreeCache itself. The only difference is that on the server machine I get the exception whereas dev machine does work.
This is the exception:
java.lang.NoClassDefFoundError: org/jgroups/MembershipListener
| java.lang.ClassLoader.defineClass1(Native Method)
| java.lang.ClassLoader.defineClass(ClassLoader.java:620)
| java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
| java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
| java.net.URLClassLoader.access$100(URLClassLoader.java:56)
| java.net.URLClassLoader$1.run(URLClassLoader.java:195)
| java.security.AccessController.doPrivileged(Native Method)
| java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:675)
| org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:655)
| java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:193)
| org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
| org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
| org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:520)
| org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
| java.lang.ClassLoader.loadClass(ClassLoader.java:299)
| java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:580)
| java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1345)
| org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
| org.jboss.jmx.adaptor.control.Server.getMBeanAttributeResultInfo(Server.java:156)
| org.apache.jsp.inspectMBean_jsp._jspService(inspectMBean_jsp.java:185)
| org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
| org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
| org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.inspectMBean(HtmlAdaptorServlet.java:204)
| org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:96)
| org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doGet(HtmlAdaptorServlet.java:77)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
|
Any ideas?
tazman
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057487#4057487
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057487
18Â years, 10Â months