You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Hanusch, Hartwig" <Ha...@fja.com> on 2000/12/15 09:50:56 UTC
error in HttpSessionFacade when working with Apache/Tomcat 3.2
Hi there,
does anybody know why a servlet works fine with tomcat only (port 8080)
but when using apache/tomcat via jk_mod (or old jserv) the servlet throws
an error like that:
java.lang.NullPointerException:
at org.apache.tomcat.facade.
HttpSessionFacade.getId(HttpSessionFacade.java:114)
...
the calling code looks that way:
session is hash of sessions
for (Iterator i = sessions.iterator(); i.hasNext(); )
{
HttpSession theHttpSession = (HttpSession) i.next();
String sid = theHttpSession.getId(); <---- problem,
calling HttpSessionFacade ....
if (loginObj.hasContentSessionRelatedBlaSession(sid) != true)
{
tmpVec.add(theHttpSession);
}
}
Could that be a configuration error? Doesnt seems like?! Any ideas?
When looking at the HttpSession the stored session in memory seem to mix up!
Happy to here from anybody
Cheers Hartwig
Re: error in HttpSessionFacade when working with Apache/Tomcat 3.2
Posted by Sean Kroah <se...@wirex.com>.
I am seeing a similar problem, but it is not related to mod_jk. Occassionaly I
try to access my Session I get this NullPointerException from
HttpSessionFacade, which is just
trying to access the Session object. The code runs fine under Tomcat 3.1. Mind
you I still think it's my code that is the problem, a deadlock. It would be
nice if a more meaningful exception could be thrown from these facade classes.
This is the third time someone has pointed out that HttpSessionFacade is
throwing a NPE and they are all in very different circumstance. Maybe i'll dig
some more through the Tomcat code to figure it out.
A quick fix for you would probably be to go back to a 3.1 release, if that's
acceptable....
Sean Kroah
"Hanusch, Hartwig" wrote:
> Hi there,
>
> does anybody know why a servlet works fine with tomcat only (port 8080)
> but when using apache/tomcat via jk_mod (or old jserv) the servlet throws
> an error like that:
>
> java.lang.NullPointerException:
> at org.apache.tomcat.facade.
> HttpSessionFacade.getId(HttpSessionFacade.java:114)
> ...
>
> the calling code looks that way:
>
> session is hash of sessions
>
> for (Iterator i = sessions.iterator(); i.hasNext(); )
> {
> HttpSession theHttpSession = (HttpSession) i.next();
> String sid = theHttpSession.getId(); <---- problem,
> calling HttpSessionFacade ....
> if (loginObj.hasContentSessionRelatedBlaSession(sid) != true)
> {
> tmpVec.add(theHttpSession);
> }
> }
>
> Could that be a configuration error? Doesnt seems like?! Any ideas?
> When looking at the HttpSession the stored session in memory seem to mix up!
>
> Happy to here from anybody
> Cheers Hartwig
--
Sean Kroah T:503.222.9660
F:503.241.5682
WireX Communications, Inc.
Software Engineer, skroah@wirex.com