TitleAttachment fails with container authentication
Date08-Jun-2007 11:18:09 EEST
VersionjspWiki-2.4.100
Submitterhemant joshi
Bug criticalityCriticalBug
Browser versionFirefox 2
Bug statusWontFixBug
PageProvider used
Servlet Containerpramati server
Operating SystemWindows XP Pro
URL
Java version1.5.0_07

when i click the upload button i get this null pointer.

exception Type: INTERNAL SERVER ERROR Requested URI: /jspwiki/attach Description:

java.lang.NullPointerException at com.ecyrd.jspwiki.auth.AuthorizationManager.checkPermission(AuthorizationManager.java:160) at com.ecyrd.jspwiki.WikiContext.hasAdminPermissions(WikiContext.java:813) at com.ecyrd.jspwiki.attachment.AttachmentServlet.executeUpload(AttachmentServlet.java:611) at com.ecyrd.jspwiki.attachment.AttachmentServlet.upload(AttachmentServlet.java:545) at com.ecyrd.jspwiki.attachment.AttachmentServlet.doPost(AttachmentServlet.java:412) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at com.ecyrd.jspwiki.dav.WebdavServlet.service(WebdavServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at com.pramati.web.servlet.core.ServiceAction.run(ServiceAction.java:83) at com.pramati.security.util.PramatiSecurityHelper._doAs(PramatiSecurityHelper.java:54) at com.pramati.security.util.AbstractSecurityHelper._doAs(AbstractSecurityHelper.java:195) at com.pramati.services.security.spi.SecurityHelper.doAs(SecurityHelper.java:144) at com.pramati.web.servlet.core.PramatiFilterChainImpl.invokeTargetWebResource(PramatiFilterChainImpl.java:314) at com.pramati.web.servlet.core.PramatiFilterChainImpl.doFilter(PramatiFilterChainImpl.java:166) at com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter(WikiServletFilter.java:100) at com.pramati.web.servlet.core.PramatiFilterChainImpl.invokeTargetFilter(PramatiFilterChainImpl.java:241) at com.pramati.web.servlet.core.PramatiFilterChainImpl.doFilter(PramatiFilterChainImpl.java:158) at com.pramati.web.servlet.core.PramatiFilterChainImpl.startDoFilter(PramatiFilterChainImpl.java:118) at com.pramati.web.interceptors.ServiceInterceptor.preProcess(ServiceInterceptor.java:114) at com.pramati.web.interceptors.core.DefaultInterceptor.process(DefaultInterceptor.java:65) at com.pramati.web.interceptors.core.InterceptorChainImpl.processNext(InterceptorChainImpl.java:48) at com.pramati.web.interceptors.core.DefaultInterceptor.process(DefaultInterceptor.java:66) at com.pramati.web.interceptors.core.InterceptorChainImpl.processNext(InterceptorChainImpl.java:48) at com.pramati.web.interceptors.core.DefaultInterceptor.process(DefaultInterceptor.java:66) at com.pramati.web.interceptors.core.InterceptorChainImpl.processNext(InterceptorChainImpl.java:48) at com.pramati.web.interceptors.core.DefaultInterceptor.process(DefaultInterceptor.java:66) at com.pramati.web.interceptors.core.InterceptorChainImpl.processNext(InterceptorChainImpl.java:48) at com.pramati.web.interceptors.core.DefaultInterceptor.process(DefaultInterceptor.java:66) at com.pramati.web.interceptors.core.InterceptorChainImpl.processNext(InterceptorChainImpl.java:48) at com.pramati.web.interceptors.core.DefaultInterceptor.process(DefaultInterceptor.java:66) at com.pramati.web.interceptors.core.InterceptorChainImpl.processNext(InterceptorChainImpl.java:48) at com.pramati.web.interceptors.core.DefaultProcessContainer.process(DefaultProcessContainer.java:97) at com.pramati.web.core.WorkerThread.processConnection(WorkerThread.java:289) at com.pramati.web.core.WorkerThread.processConnection(WorkerThread.java:263) at com.pramati.web.core.WorkerThread.run(WorkerThread.java:129)

please do reply as soon as possible as my application in finishing mode and in last moment i got this error...


Turn on jspwiki.security=jaas, and edit web.xml. JSPWiki should be able to notice that you have done so and does all the right things. There should be no reason anymore to set jspwiki.security to anything else.

--JanneJalkanen, 09-Jun-2007


but i don't want jaas authentication..that's is why in jspwiki.properties i had assigned jspwiki.security=container and web.xml also mentioned the logical role mappings..

The problem is while attaching it is fetching for some permissions..

--AnonymousCoward, 11-Jun-2007


If you enable container auth in web.xml, JSPWiki will pick it up without declaring "jspwiki.security=container".

--JanneJalkanen, 11-Jun-2007


ok.But then why when i click for attachment it seeks permission and give null pointer exception.

--AnonymousCoward, 12-Jun-2007


Because there's a bug... Turning off JAAS security was meant to be a stopgap measure until we can get it properly integrated with container-managed security. Now it works, so there's no reason to turn off JAAS anymore.

--JanneJalkanen, 12-Jun-2007


i am like bit confused now,as our application is running pretty fine by turning off jaas n using only container authentication in 2.4.91 version.

please kindly tell me what all changes i have to do in 2.4.100 version and one more thing if i turn on jspwiki.security=jaas then i am unable to edit and whenever i try to attach any document it everytime attaching main page of application. So where all i need to change for turning on jaas. And one more thing when i do search for anything then it gives me everything in descending order and score is zero for every search result,something like this::

Page Score

xcvsdfs 0 fdagdhasg 0

--AnonymousCoward, 12-Jun-2007


unclear what happened to this one, please file a bug report in JIRA if you want it solved

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-12) was last changed on 19-Feb-2008 14:24 by HarryMetske