Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » SEVERE: Allocate exception for servlet Faces Servlet java.lang.NullPointerException
SEVERE: Allocate exception for servlet Faces Servlet java.lang.NullPointerException [message #474156] Mon, 30 April 2007 09:06 Go to next message
Eclipse UserFriend
Originally posted by: dnatochy.gmail.com

Hello there,

Pardon my ignorance, I am new to Eclipse and JSF.
I followed the steps from this webinar
https://admin.adobe.acrobat.com/_a300965365/p87371911/ to create a demo app.
However when I click on a jsp file and select Run As -> Run on Server, I am
getting a nasty error from Tomcat:

Apr 30, 2007 1:58:57 AM 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(Standar dWrapper.java:1139)
at org.apache.catalina.core.StandardWrapper.load(StandardWrappe r.java:966)
at
org.apache.catalina.core.StandardContext.loadOnStartup(Stand ardContext.java:3956)
at org.apache.catalina.core.StandardContext.start(StandardConte xt.java:4230)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.j ava:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.jav a:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.j ava:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine .java:443)
at org.apache.catalina.core.StandardService.start(StandardServi ce.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer .java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552 )
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:2 95)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:43 3)
Apr 30, 2007 1:58:57 AM org.apache.catalina.core.StandardContext
loadOnStartup
SEVERE: Servlet /jsfwebinar threw load() exception
java.lang.NullPointerException
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
at
org.apache.catalina.core.StandardWrapper.loadServlet(Standar dWrapper.java:1139)
at org.apache.catalina.core.StandardWrapper.load(StandardWrappe r.java:966)
at
org.apache.catalina.core.StandardContext.loadOnStartup(Stand ardContext.java:3956)
at org.apache.catalina.core.StandardContext.start(StandardConte xt.java:4230)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.j ava:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.jav a:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.j ava:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine .java:443)
at org.apache.catalina.core.StandardService.start(StandardServi ce.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer .java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552 )
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:2 95)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:43 3)
Apr 30, 2007 1:58:57 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Apr 30, 2007 1:58:57 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 30, 2007 1:58:57 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/15 config=null
Apr 30, 2007 1:58:57 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Apr 30, 2007 1:58:57 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 719 ms
Apr 30, 2007 1:58:58 AM 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(Standar dWrapper.java:1139)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWr apper.java:791)
at
org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:127)
at
org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:151)
at
org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:870)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11Connection Handler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Poo lTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.ru n(ThreadPool.java:685)
at java.lang.Thread.run(Unknown Source)
Apr 30, 2007 1:58:58 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet Faces Servlet
java.lang.NullPointerException
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144
at
org.apache.catalina.core.StandardWrapper.loadServlet(Standar dWrapper.java:1139)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWr apper.java:791)
at
org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:127)
at
org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:151)
at
org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:870)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11Connection Handler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Poo lTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.ru n(ThreadPool.java:685)
at java.lang.Thread.run(Unknown Source)

My guess is that JSF jars are not included in the deployed app. If so, how I
do tell Eclipse to do that?

I am running Eclipse 3.3 with Tomcat 5.5 (java jre1.5.0_10).

Thanks,
Dennis
Re: SEVERE: Allocate exception for servlet Faces Servlet java.lang.NullPointerException [message #474157 is a reply to message #474156] Mon, 30 April 2007 19:26 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
Did you install the JSF facet when you created the dynamic web project?
That should cause the addition of the JSF libraries.

Can you show me your web.xml and faces-config.xml files? Also, which JSF
implementation are you using (i.e. where did you download it from).


--Cam
Re: SEVERE: Allocate exception for servlet Faces Servlet java.lang.NullPointerEx [message #474178 is a reply to message #474156] Mon, 30 April 2007 23:04 Go to previous messageGo to next message
Raghu Srinivasan is currently offline Raghu SrinivasanFriend
Messages: 265
Registered: July 2009
Senior Member
Please check if you have any of the JSF libraries in a folder with spaces
in its name. I recollect getting similar errors with Tomcat 6.0.
-Raghu


Raghu Srinivasan,
Project Lead - JSF
Re: SEVERE: Allocate exception for servlet Faces Servlet java.lang.NullPointerException [message #474179 is a reply to message #474157] Wed, 02 May 2007 05:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dnatochy.gmail.com

Cameron/Raghu,

I am using :
Sun Reference implementation (RI) for JSR 127 (jsf1.1):
http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&a mp;PartDetailId=jsf-1.1-ri-oth-JPR&SiteId=JSC&Transa ctionId=noreg
JSF facet is installed in Eclipse.

web.xml:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE web-app PUBLIC "-//Sun
Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp_ID">
<display-name>JSFWebinarDemo2</display-name>
<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>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>

faces-config.xml:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
</faces-config>

JSF libraries do not have spaces in their names.

One strange thing: I've been testing on Tomcat 5.5. Then I installed 6.0 -
same issue. Tried 5.0 - works! Unfortunately I would like to use java 1.5,
which is not supported by tomcat 5.0 as far as I understand. :(


"Cameron Bateman" <cameron.bateman@oracle.com> wrote in message
news:5042aabec15132cd1df464eb5a8d0c9f$1@www.eclipse.org...
> Did you install the JSF facet when you created the dynamic web project?
> That should cause the addition of the JSF libraries.
> Can you show me your web.xml and faces-config.xml files? Also, which JSF
> implementation are you using (i.e. where did you download it from).
>
>
> --Cam
>
Re: SEVERE: Allocate exception for servlet Faces Servlet java.lang.NullPointerException [message #474182 is a reply to message #474179] Thu, 03 May 2007 18:34 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
I am able to get a basic page working with your web.xml and
faces-config.xml, so it must be a configuration problem. Classpath (JSF
library) is a good candidate. What version of WTP/JSF tools are you
using? What jars are in your implementation JSF library?


--Cam
Re: SEVERE: Allocate exception for servlet Faces Servlet java.lang.NullPointerException [message #609345 is a reply to message #474156] Mon, 30 April 2007 19:26 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
Did you install the JSF facet when you created the dynamic web project?
That should cause the addition of the JSF libraries.

Can you show me your web.xml and faces-config.xml files? Also, which JSF
implementation are you using (i.e. where did you download it from).


--Cam
Re: SEVERE: Allocate exception for servlet Faces Servlet java.lang.NullPointerEx [message #610953 is a reply to message #474156] Mon, 30 April 2007 23:04 Go to previous message
Raghu Srinivasan is currently offline Raghu SrinivasanFriend
Messages: 265
Registered: July 2009
Senior Member
Please check if you have any of the JSF libraries in a folder with spaces
in its name. I recollect getting similar errors with Tomcat 6.0.
-Raghu


Raghu Srinivasan,
Project Lead - JSF
Re: SEVERE: Allocate exception for servlet Faces Servlet java.lang.NullPointerException [message #610954 is a reply to message #474157] Wed, 02 May 2007 05:05 Go to previous message
Eclipse UserFriend
Originally posted by: dnatochy.gmail.com

Cameron/Raghu,

I am using :
Sun Reference implementation (RI) for JSR 127 (jsf1.1):
http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&a mp;PartDetailId=jsf-1.1-ri-oth-JPR&SiteId=JSC&Transa ctionId=noreg
JSF facet is installed in Eclipse.

web.xml:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE web-app PUBLIC "-//Sun
Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp_ID">
<display-name>JSFWebinarDemo2</display-name>
<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>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>

faces-config.xml:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
</faces-config>

JSF libraries do not have spaces in their names.

One strange thing: I've been testing on Tomcat 5.5. Then I installed 6.0 -
same issue. Tried 5.0 - works! Unfortunately I would like to use java 1.5,
which is not supported by tomcat 5.0 as far as I understand. :(


"Cameron Bateman" <cameron.bateman@oracle.com> wrote in message
news:5042aabec15132cd1df464eb5a8d0c9f$1@www.eclipse.org...
> Did you install the JSF facet when you created the dynamic web project?
> That should cause the addition of the JSF libraries.
> Can you show me your web.xml and faces-config.xml files? Also, which JSF
> implementation are you using (i.e. where did you download it from).
>
>
> --Cam
>
Re: SEVERE: Allocate exception for servlet Faces Servlet java.lang.NullPointerException [message #610957 is a reply to message #474179] Thu, 03 May 2007 18:34 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
I am able to get a basic page working with your web.xml and
faces-config.xml, so it must be a configuration problem. Classpath (JSF
library) is a good candidate. What version of WTP/JSF tools are you
using? What jars are in your implementation JSF library?


--Cam
Previous Topic:WYSIWYG HTML editor
Next Topic:WTP 1.5.4 released
Goto Forum:
  


Current Time: Tue Apr 16 08:42:55 GMT 2024

Powered by FUDForum. Page generated in 0.35019 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top