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/18 08:30:48 UTC
AW: error in HttpSessionFacade when working with Apache/Tomcat 3.
2 - i bit more accurate
Hi Sean and everybody else
i tried to find out a bit more - this error is quite reproduceble.
When using the same servlet i call from the get method the
do post and versa visa.
What i've seen is, that tomcat uses an other session object
(what shouldnt be the case) ... and i cant go back to 3.1 because
of the cookie-session stuff (but the problem is not related to cookies
anyway)
Any other suggestions?
Cheers Hartwig
> -----Ursprüngliche Nachricht-----
> Von: Sean Kroah [SMTP:sean@wirex.com]
> Gesendet am: Freitag, 15. Dezember 2000 18:31
> An: tomcat-user@jakarta.apache.org
> Betreff: Re: error in HttpSessionFacade when working with
> Apache/Tomcat 3.2
>
> 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
>