TitleWikiContext may not be null problem on first login to newly-started Tomcat
Date11-Aug-2006 16:56:39 EEST
Version2.4.15-beta
SubmitterMikeW
Bug criticalityLightBug
Browser versionFirefox, IE
Bug statusClosedBug
PageProvider used FileSystemProvider
Servlet ContainerTomcat 5.5
Operating SystemXP Professional
URLhttp://localhost/JspWiki/Login.jsp
Java version1.5

I'm runing 2.4.1.15-beta with the brushed template and the Smart skin. I'm using container-based authentication. If I restart Tomcat, open a browser to the Main page, click Log In, enter a username/password in the Login dialog, I receive the below message. If I then hit refresh, or click the Login button again, then I am logged in, the page is personalized for me, and I return to the Main page. Subsequent logins appear to work fine.

I've attached Tomcat logs, JSPWiki logs and my jspwiki.properties file.

Which BrushedTemplate version are you using ? --DF
I'm using the brushed template with the Smart skin (which is terrific by the way). I believe I'm using the August 06 drop of the template. I have made a few mods to the template customizing it to work with container auth and to disable assertions. Do you think my tweaks may be the cause? -- MikeW

javax.servlet.jsp.JspException: Tag failed, check logs: WikiContext may not be NULL - serious internal problem!
	at com.ecyrd.jspwiki.tags.WikiTagBase.doStartTag(WikiTagBase.java:90)
	at org.apache.jsp.Error_jsp._jspx_meth_wiki_Messages_0(Error_jsp.java:180)
	at org.apache.jsp.Error_jsp._jspService(Error_jsp.java:129)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
	at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
	at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
	at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:818)
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
	at org.apache.jsp.Login_jsp._jspService(Login_jsp.java:165)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter(WikiServletFilter.java:103)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833)
	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
	at java.lang.Thread.run(Unknown Source)
Aug 11, 2006 9:02:13 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Tag failed, check logs: WikiContext may not be NULL - serious internal problem!
	at com.ecyrd.jspwiki.tags.WikiTagBase.doStartTag(WikiTagBase.java:90)
	at org.apache.jsp.Error_jsp._jspx_meth_wiki_Messages_0(Error_jsp.java:180)
	at org.apache.jsp.Error_jsp._jspService(Error_jsp.java:129)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
	at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
	at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
	at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:818)
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
	at org.apache.jsp.Login_jsp._jspService(Login_jsp.java:165)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter(WikiServletFilter.java:103)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833)
	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
	at java.lang.Thread.run(Unknown Source)

I downgraded it, since it's probably more annoying than harmful. But I'm sort of stymied on this one.

-- JanneJalkanen, 13-Aug-2006

Well, checking the log file would be helpful to determine which wiki tag failed, which would be useful.

-- Alex Reid, 14-Aug-2006

I've attached (what are I think) the relevant logs, but I'm not sure what to look for exactly. In the logs, I make two identical login attempts, the first failing, the second working fine. The only difference I can see is that after committing all the principals following the initial login, there is some user/group checking happening that seems to run into problems.

2006-08-11 09:02:13,563 [http-80-2] INFO com.ecyrd.jspwiki.auth.UserManager JSPWiki:http://localhost/JspWiki/Login.jsp - Attempting to load group manager class com.ecyrd.jspwiki.auth.authorize.DefaultGroupManager
2006-08-11 09:02:13,563 [http-80-2] INFO com.ecyrd.jspwiki.auth.authorize.DefaultGroupManager JSPWiki:http://localhost/JspWiki/Login.jsp - Loading user database group information from wiki pages...
2006-08-11 09:02:13,610 [http-80-2] DEBUG com.ecyrd.jspwiki.WikiEngine JSPWiki:http://localhost/JspWiki/Login.jsp - Servlet path is: /Error.jsp
2006-08-11 09:02:13,610 [http-80-2] DEBUG com.ecyrd.jspwiki.WikiEngine JSPWiki:http://localhost/JspWiki/Login.jsp - Mapped to null
2006-08-11 09:02:13,610 [http-80-2] DEBUG com.ecyrd.jspwiki.WikiSession$SessionMonitor JSPWiki:http://localhost/JspWiki/Login.jsp - Looking up WikiSession for session ID=08A84B2CEA4F1FB5ED164CF5F07A96F0... found it
2006-08-11 09:02:13,610 [http-80-2] DEBUG com.ecyrd.jspwiki.WikiContext JSPWiki:http://localhost/JspWiki/Login.jsp - Creating WikiContext for session ID=08A84B2CEA4F1FB5ED164CF5F07A96F0; page=Main
2006-08-11 09:02:13,610 [http-80-2] DEBUG com.ecyrd.jspwiki.WikiContext JSPWiki:http://localhost/JspWiki/Login.jsp - Do we need to log the user in? false
2006-08-11 09:02:13,610 [http-80-2] DEBUG JSPWiki JSPWiki:http://localhost/JspWiki/Login.jsp - Error.jsp exception is: 
java.lang.NullPointerException
	at com.ecyrd.jspwiki.auth.WikiSecurityEvent.toString(WikiSecurityEvent.java:186)
The same entries are not found after the second login.

-- MikeW, 16-Aug-2006

Closing, no activity for nearly a year, and not reproducible.

-- JanneJalkanen

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
log
catalina.2006-08-11.log 1.7 kB 1 11-Aug-2006 18:13 130.214.9.243
log
jspwiki.log 45.9 kB 1 11-Aug-2006 18:13 130.214.9.243
properties
jspwiki.properties 26.3 kB 1 11-Aug-2006 18:17 130.214.9.243
log
localhost.2006-08-11.log 9.8 kB 1 11-Aug-2006 18:13 130.214.9.243
log
security.log 6.3 kB 1 11-Aug-2006 18:13 130.214.9.243
« This page (revision-15) was last changed on 12-Jun-2007 23:53 by JanneJalkanen