Is this a Jboss Clustering Bug??
williams Dec 6, 2002 7:54 PMHi,
I am trying to get clustering going with JBoss 3.0.4. I have Jboss server instance (with all option) running on two different machines. They are part of the same multicast group and when I deploy my application .ear file in the /server/all/deploy directory, everything looks fine. I am using the default Jboss setting for clustering. My application .ear file contains only one stateless session EJB and I have made the tag true in the jboss.xml file. I am not using session failover, and hence not using the tag in the web.xml file. I deploy the ear file in the two servers and they recognize they are part of a cluster - works great. When I start my browser and access my application, one of the server (say server 1) picks up the request. The next few requests from the browser is handled by server 1.
However, all on a sudden, the request gets transferred to the other server (say server 2), and everything fails. My application throws the following error message (Price Request Model is a variable stored in session):
18:30:43,941 INFO [STDOUT] Price Request Model is null
18:30:43,951 WARN [jbossweb] WARNING: Exception for /RASController
java.lang.NullPointerException
at wep.handler.DeliveryScheduleHandler.processSave(DeliveryScheduleHandler.java:84)
at wep.handler.DeliveryScheduleHandler.doGet(DeliveryScheduleHandler.jav
a:53)
at wep.handler.DeliveryScheduleHandler.doPost(DeliveryScheduleHandler.ja
va:129)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366
)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:293)
at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:216)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:151)
at wep.controller.RASController.doPost(RASController.java:135)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366
)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:293)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
81)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1687)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:544)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1637)
at org.mortbay.http.HttpServer.service(HttpServer.java:875)
at org.jboss.jetty.Jetty.service(Jetty.java:543)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:806)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:956)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:823)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
203)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:290)
at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743)
at java.lang.Thread.run(Thread.java:479)
As far as I understand, server 1 should keep serving the the browser/client until it dies - why does the other server suddenly kick in? When a client/browser opens a session, it should be served by the same server until and unless the server dies - am I wrong in my understanding?
If the request gets transferred to the other server (server 2), it will fail because its session tracking does not contain the session variables of server 1. So, is this a bug in Jboss? I tried looking at javagroups.com or jboss clustering forum to see if I need to do anything special, but did not get much information on this error. Can anyone please help?
Thanks a lot.
Raj