• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet Exception in Servlet.init() for servlet Faces  RSS feed

 
Rajat Bhatnagar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to deploy my first JSF application in tomcat 5.5 . The directory structure is fine and so are the tag entries in faces-config.xml and web.xml.

But when i try to deploy it in Tomcat it throws an exception.
I tried 3 alternatives as seen in forums but they don't work:

These Alternatives are

1. PLace jstl.jsr in lib folder of tomcat

2. add this entry to the web.xml of application
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

3. add this entry to the web.xml of application
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>


The StackTrace is


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Unknown Source)


root cause

java.lang.NullPointerException
javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
[ September 23, 2008: Message edited by: Rajat Bhatnagar ]
 
John Abjanic
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having the same problem, did you ever get this problem solved?
Thanks, John
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rather start your own topic instead of hijacking other's topic.

Paste the entire stacktrace in your new topic and show the minimal contents of the web.xml and faces-config.xml files which still reproduces this problem (maybe you should already have solved the problem while stripping out the web.xml and faces-config.xml from unnecessary stuff ;) ). Good luck.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!