users@glassfish.java.net

RE: Obtaining LoginException

From: Shevland, Joe <joe.shevland_at_capgemini.com>
Date: Fri, 3 Aug 2007 16:44:21 +1000

> > very recently in GlassFish v2 (as of build 57).

I'm still seeing the same NPE in build 57:

[#|2007-08-03T16:34:39.671+1000|WARNING|sun-appserver9.1|org.apache.cata
lina.authenticator.FormAuthenticator|_ThreadID=17;_ThreadName=httpSSLWor
kerThread-8181-0
;_RequestID=f2528be5-34eb-4753-84d4-e5a55360f5b1;|Unexpected error
forwarding or redirecting to login page
org.apache.jasper.JasperException: java.lang.NullPointerException
  at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:402)
  ...
  ...
Caused by: java.lang.NullPointerException
        at org.apache.jsp.login.login_jsp._jspService(login_jsp.java:26)

The offending code still being:

 
response.setStatus(((Integer)request.getAttribute("javax.servlet.error.s
tatus_code")).intValue());

Just putting <%_at_page isErrorPage="true"%> is enough to trigger this in
the form-error-page page, although I've tried with and without -
without, the NPE just occurs further down in the code when I try and do
a System.out.println(pageContext.getErrorData()):

Caused by: java.lang.NullPointerException
        at
javax.servlet.jsp.PageContext.getErrorData(PageContext.java:536)
        at
org.apache.jsp.login.login_005ferror_jsp._jspService(login_005ferror_jsp
..java:49)

Cheers,
Joe

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.