Bug#406780: tomcat5: NullPointerException on loading FacesServlet (JSF)

Marko Randjelovic marel at sbb.co.yu
Sun Jan 14 12:05:43 UTC 2007


Marcus Better wrote:
> Can you reproduce it without a security manager?
>
> Can you check if it works with tomcat5.5?
>
> Marcus
>   
I toggled TOMCAT5_SECURITY to no in /etc/default/tomcat5 and restarted 
tomcat5. Now I get similar error.

===

2007-01-14 12:46:19 
StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: 
init(): ruleChain: [org.apache.webapp.balancer.RuleChain: 
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: 
News / Redirect URL: http://www.cnn.com], 
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param 
name: paramName / Target param value: paramValue / Redirect URL: 
http://www.yahoo.com], 
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: 
http://jakarta.apache.org]]
2007-01-14 12:46:20 StandardContext[/servlets-examples]ContextListener: 
contextInitialized()
2007-01-14 12:46:20 StandardContext[/servlets-examples]SessionListener: 
contextInitialized()
2007-01-14 12:46:20 StandardContext[/jsp-examples]ContextListener: 
contextInitialized()
2007-01-14 12:46:20 StandardContext[/jsp-examples]SessionListener: 
contextInitialized()
2007-01-14 12:46:20 StandardContext[/Jsf_Ex01]StandardWrapper.Throwable
java.lang.NullPointerException
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
    at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)
    at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:876)
    at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4017)
    at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
    at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
    at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
    at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
    at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
    at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
    at 
org.apache.catalina.core.StandardService.start(StandardService.java:480)
    at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

2007-01-14 12:46:20 StandardContext[/Jsf_Ex01]Servlet /Jsf_Ex01 threw 
load() exception
javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet 
threw exception
    at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1085)
    at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:876)
    at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4017)
    at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
    at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
    at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
    at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
    at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
    at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
    at 
org.apache.catalina.core.StandardService.start(StandardService.java:480)
    at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
----- Root Cause -----
java.lang.NullPointerException
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
    at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)
    at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:876)
    at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4017)
    at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
    at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
    at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
    at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
    at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
    at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
    at 
org.apache.catalina.core.StandardService.start(StandardService.java:480)
    at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

===

With tomcat5.5 (didn't change any options), there are no errors, yet it 
does not work correctly. It outputs only blank page, size 0, with 
content-type of text/plain instead of text/html.




More information about the pkg-java-maintainers mailing list