tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hiroshi Iwatani <HGA03...@nifty.ne.jp>
Subject Re: NullPointerException loading JavaServer Faces web application
Date Wed, 15 Sep 2004 22:41:05 GMT
Tell us about whole structure of you application based on the JSF.
For example, where have you put what and what?

Garret Wilson wrote:
> In Tomcat 5.5.0 I have a simple application using the JavaServer Faces
> 1.1 reference implementation.
> 
> <?xml version="1.0"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
> 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> 
> <web-app>
> 
>     <display-name>Web Application</display-name>
> 
>     <description>Web Application</description>
> 
>     <servlet>
>         <servlet-name>Faces Servlet</servlet-name>
>         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
> 
>     <servlet-mapping>
>         <servlet-name>Faces Servlet</servlet-name>
>         <url-pattern>*.faces</url-pattern>
>     </servlet-mapping>
> 
>     <welcome-file-list>
>         <welcome-file>default.jsp</welcome-file>
>         <welcome-file>index.html</welcome-file>
>     </welcome-file-list>
> 
> </web-app>
> 
> The application loads fine on Tomcat 5.5.0.
> 
> After installing the exact same configuration in Tomcat 5.5.1, I get the
> following error:
> 
> Sep 14, 2004 2:51:47 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: StandardWrapper.Throwable
> java.lang.NullPointerException
>         at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
> java:1003)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:83
> 6)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
> t.java:3823)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> 128)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
> .java:755)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
> 9)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
> 
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja
> va:587)
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
> ava:535)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470
> )
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1076)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
> :310)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
> eSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
> 
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
> 
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:420
> )
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:4
> 50)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:196
> 7)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:541)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
> Sep 14, 2004 2:51:48 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: Servlet /class threw load() exception
> javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet
> threw e
> xception
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
> java:1045)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:83
> 6)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
> t.java:3823)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> 128)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
> .java:755)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
> 9)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
> 
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja
> va:587)
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
> ava:535)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470
> )
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1076)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
> :310)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
> eSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
> 
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
> 
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:420
> )
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:4
> 50)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:196
> 7)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:541)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
> Sep 14, 2004 2:51:48 PM org.apache.catalina.core.ApplicationContext log
> INFO: 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.bal
> ancer.rules.RequestParameterRule: Target param name: paramName / Target
> param va
> lue: paramValue / Redirect URL: http://www.yahoo.com],
> [org.apache.webapp.balanc
> er.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
> Sep 14, 2004 2:51:48 PM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Sep 14, 2004 2:51:48 PM org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
> Sep 14, 2004 2:51:48 PM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Sep 14, 2004 2:51:48 PM org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
> Sep 14, 2004 2:51:49 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> Sep 14, 2004 2:51:49 PM org.apache.jk.common.ChannelSocket init
> INFO: JK2: ajp13 listening on /0.0.0.0:8009
> Sep 14, 2004 2:51:49 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/30
> config=C:\jakarta-tomcat-5.5.1\conf\jk2.propert
> ies
> Sep 14, 2004 2:51:49 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 1923 ms
> 
> After upgrading to the JavaServer Faces 1.1_01 reference implementation,
> the same error occurs:
> 
> Sep 14, 2004 2:59:08 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: StandardWrapper.Throwable
> java.lang.NullPointerException
>         at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
> java:1003)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:83
> 6)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
> t.java:3823)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> 128)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
> .java:755)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
> 9)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
> 
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja
> va:587)
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
> ava:535)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470
> )
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1076)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
> :310)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
> eSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
> 
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
> 
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:420
> )
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:4
> 50)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:196
> 7)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:541)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
> Sep 14, 2004 2:59:08 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: Servlet /class threw load() exception
> javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet
> threw e
> xception
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
> java:1045)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:83
> 6)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
> t.java:3823)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> 128)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
> .java:755)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
> 9)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
> 
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja
> va:587)
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
> ava:535)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470
> )
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1076)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
> :310)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
> eSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
> 
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
> 
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:420
> )
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:4
> 50)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:196
> 7)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:541)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
> Sep 14, 2004 2:59:08 PM org.apache.catalina.core.ApplicationContext log
> INFO: 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.bal
> ancer.rules.RequestParameterRule: Target param name: paramName / Target
> param va
> lue: paramValue / Redirect URL: http://www.yahoo.com],
> [org.apache.webapp.balanc
> er.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
> Sep 14, 2004 2:59:08 PM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Sep 14, 2004 2:59:08 PM org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
> Sep 14, 2004 2:59:09 PM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Sep 14, 2004 2:59:09 PM org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
> Sep 14, 2004 2:59:09 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> Sep 14, 2004 2:59:09 PM org.apache.jk.common.ChannelSocket init
> INFO: JK2: ajp13 listening on /0.0.0.0:8009
> Sep 14, 2004 2:59:09 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/30
> config=C:\jakarta-tomcat-5.5.1\conf\jk2.propert
> ies
> Sep 14, 2004 2:59:09 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 1882 ms
> 
> Any ideas?
> 
> Garret
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

-- 
Hiroshi Iwatani

*stop cruelty* Annual number of institutionally euthanized cats and dogs 
including kittens and puppies: US 5 million, JP 500 thousand. How about your 
country? *for our better karma*
---------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message