Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 6493 invoked by uid 500); 1 Oct 2001 14:33:20 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 6460 invoked from network); 1 Oct 2001 14:33:19 -0000 Message-ID: <009d01c14a86$40d1d110$6a02a8c0@husws06> From: "Zsolt Horvath" To: References: <5.1.0.14.0.20011001200341.00a5b8c0@pop.mail.yahoo.com> Subject: Re: NullPointerException in getSession Date: Mon, 1 Oct 2001 16:34:57 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N You get this error message in 2 cases: 1. You want to acces the session, but it doesn't exist (use getSession(true)) 2. You want to acces a session value, but it doesn't exist: e.g: request.getSession().getValue("ANYTHING"), and ANYTHING variable not in the session. ----- Original Message ----- From: "Manu KY" To: Sent: Monday, October 01, 2001 4:34 PM Subject: Re: NullPointerException in getSession > Hi, > please paste the code for easy debugging!!!. > > did you do getSession(true)? > > Manu > >Hi all. Does anyone know a solution to the exception presented > >below? It happens when I try to get an http session. > >The interesting thing is that this problem is not deterministic: > >sometimes it happens and sometimes it does not (obviously, using > >the same code and the same environment). > > > >Any help is welcome! > > > >Thanks, > > > >Daniel Novy. > > > >java.lang.NullPointerException > > at > >org.apache.tomcat.core.RequestImpl.getSession(RequestImpl.java:497) > > at > >org.apache.tomcat.facade.HttpServletRequestFacade.getSession(HttpServletReq u > >estFacade.java:382) > > at cetip.web.CtpRequest.getHttpSession(CtpRequest.java:350) > > at cetip.web.CtpWebUser.getSessionAttribute(CtpWebUser.java:467) > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > >