PDA

View Full Version : NullPointerException in tomcat



ulrich
09-12-2007, 05:52 AM
Hi,

I am trying the 1.6 RC2, I downloaded the j2ee deployment version, deployed it to tomcat and when I access
any URL I get the exception below.
Maybe it is not a problem of this RC2, but I don' know.

If I found the source code correctly, the method is


public static boolean isPentahoAdministrator(IPentahoSession session) {
IAclVoter voter = PentahoSystem.getAclVoter(session);
return voter.isPentahoAdministrator(session);
}

and the problem is that the variable 'voter' is null. How can it be solved?

Thanks in advance,
Ulrich



java.lang.NullPointerException
com.pentaho.security.SecurityUtils.isPentahoAdministrator(SecurityUtils.java:155)
org.pentaho.core.system.PentahoSystem.isAdministrator(PentahoSystem.java:1323)
org.pentaho.core.util.UIUtil.processTemplate(UIUtil.java:96)
org.pentaho.core.util.UIUtil.breakTemplateString(UIUtil.java:126)
org.pentaho.core.util.UIUtil.breakTemplate(UIUtil.java:121)
org.apache.jsp.jsp.Login_jsp._jspService(Login_jsp.java:162)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
org.acegisecurity.ui.switchuser.SwitchUserProcessingFilter.doFilter(SwitchUserProcessingFilter.java:335)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
com.pentaho.security.SecurityStartupFilter.doFilter(SecurityStartupFilter.java:78)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
com.pentaho.security.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:164)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:108)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
com.pentaho.security.HttpSessionReuseDetectionFilter.doFilter(HttpSessionReuseDetectionFilter.java:130)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:193)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
org.pentaho.core.system.SystemStatusFilter.doFilter(SystemStatusFilter.java:53)
org.pentaho.ui.servlet.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)

ulrich
09-12-2007, 06:48 AM
I found this message in the server.log:

2007-09-12 12:29:45,545 ERROR [org.pentaho.util.logging.Logger] misc-org.pentaho.core.system.PentahoSystem: PentahoSystem.ERROR_0021 - Could not detemine implementor for IAclVoter
2007-09-12 12:29:45,545 ERROR [org.pentaho.util.logging.Logger] misc-org.pentaho.core.system.PentahoSystem: PentahoSystem.ERROR_0021 - Could not detemine implementor for ISubscriptionRepository

ulrich
09-12-2007, 09:10 AM
found it: I pointed to a pentaho-solutions/system folder of the 1.2.1 version and the pentaho.xml file does not contain the appropriate elements (IAclPublisher etc.) in the objects tag.

It would be nice, however, to throw a more explanatory exception.

Or/and, why not add a correct pentaho-solutions folder to the j2ee download!

Regards,
Ulrich