|
| NullPointerException in SessionData.removeAttribute, getServletContext |
 |
Thu, 30 Aug 2007 11:56:22 -070 |
I am trying to setup Session replication on BEA10 installed on my non multihomed
windows machine.
I have added two managed servers (MS1, MS2) to the cluster (MYCLUSTER) and have
set the cluster MYCLUSTER as the target for my web application.
Information about my setup is as follows -
1. I have set my machine to have static IP
2. For load balancing, I have installed
weblogic.servlet.proxy.HttpClusterServlet on third managed server (MS3). This
third server is not part of the cluster, MYCLUSTER
3. Load balancing is working fine because when I hit the URL of the app the
request goes in round-robin to each server in the cluster.
This I have verified from the logs of both the servers (MS1, MS2).
4. When I hit one of the servers (say MS1) and login into the application the
app starts working fine and I am able to navigate through different pages.
Now the problem is that when I shutdown the MS1 which has responded to the
current session and then try to navigate further in the application, I get
following exceptions in the log file of the MS2.
Point worth noting is that some part of the session has got replicated to the
MS2 because I remain logged-in into the application when I try to send request
to the app which is now being served by MS2.
The User Info is available in session in the second server and also appears on
the page.
5. I have set
<persistent-store-type>replicated</persistent-store-type> under
session-descriptor in weblogic.xml
6. I have deployed app as exploded WAR and have set
<page-check-seconds>0</page-check-seconds> for jsp hot deployment.
[pre]####<Aug 30, 2007 10:53:51 AM MST> <Error> <HTTP>
<VCHADD745> <Server9080> <[ACTIVE] ExecuteThread: '10' for queue:
'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <>
<> <1188496431495> <BEA-101020>
<[weblogic.servlet.internal.WebAppServletContext@2226390 - appName:
'mywebapp', name: 'mywebapp.war', context-path: '/mywebapp'] Servlet failed with
Exception
java.lang.NullPointerException
at
weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.java:6
27)
at
weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.java:5
86)
at
weblogic.servlet.internal.session.ReplicatedSessionData.removeAttribute(Replicat
edSessionData.java:523)
at com.mypackage.SomeSessionContext.clear(SomeSessionContext.java:893)
java.lang.NullPointerException
at
weblogic.servlet.internal.session.SessionData.getServletContext(SessionData.java
:233)
at
com.mypackage.SomeSessionContext.getApplicationBean(SomeSessionContext.java:199)
[/pre]
[b]Code at line 893 SomeSessionContext.java[/b]
[pre]this.session.removeAttribute(element);[/pre]
[b]Code at 199 in SomeSessionContext.java[/b]
[pre]ServletContext servletContext = this.session.getServletContext();[/pre]
|
| Post Reply
|
|
|
|
|
|
|
|
|
|