tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Amanti <mama...@sbcglobal.net>
Subject Does JSF 2.0 work on Tomcat 6.0.26 ?
Date Tue, 29 Jun 2010 17:44:24 GMT
Does JSF 2.0 work on Tomcat 6.0.26 ?

I've installed...
      Tomcat 6.0.26                             ( for Windows x64 arch ).
      JVM Version:    1.6.0_20-b02     ( for Windows x64 arch ).

I'm reading book entitled "Java Server Faces 2.0, The Complete Reference".
Chapter 2, page 30 is entitled "Buidling And Running (jsfreg) The 
Application".
To build, I am using Maven...
         Microsoft Windows [Version 6.1.7600]
         Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
         C:\l>*mvn -v*
                 Apache _*Maven 2.2.1*_ (r801777; 2009-08-06 14:16:01-0500)
                 Java version: 1.6.0_20
                 Java home: C:\glassfishv3\jdk\jre
                 Default locale: en_US, platform encoding: Cp1252
                 OS name: "windows 7" version: "6.1" arch: "amd64" 
Family: "windows"

	Regarding "Setting Up Maven 2"( at www.jsfcompref.com ),
	and the .m2.settings.xml file,
	the article did not describe the scenario when doing this is required,
	or applicable, so, I skipped that part about the .m2/settings.xml file.
	(and Maven 2.2.1 seems to be working fine).

The ch02 pom.xml (original) produces a WAR file without the JSF libraries.
However, the WAR produced would not run on Apache Tomcat 6.0 and a
casual browse over the Tomcat 6.0 documentation didn't seem to say
anything about JSF related administration for Tomcat.
Does it?
Should it?

Chapter 2 page 30 describes how to modify the the ch02 pom.xml to include the
JSF libraries inside the WAR file.
However, this WAR file also would not run, but it did produce JSF libraries in
Directory ch02/target/jsfreg/WEB-INF/lib contained 2 files...
1) jsf-imp-l2.0.0.jar
2) jsf-api-2.0.jar
I copied these 2 jars to Tomcat 6.0/lib directory.
Then I did mvn clean and copied the original pom.xml (excludes JSF libs)
and rebuilt via mvn install to produce a WAR and then deployed the WAR.
I was able to start the WAR (once) and it's status was running.
Using my browser, I addressed the application via
http://localhost:8080/jsfreg

THE PROBLEM IS :
the response I receive is
	"HTTP Status 404 - Faces Servlet is not available".

AND I could NOT (re)start the WAR... it would not run a second time.

HERE IS THE CATALINA LOG:
Jun 28, 2010 4:49:24 PM com.sun.faces.config.ConfigureListener
contextInitialized
INFO: Initializing Mojarra 2.0.0 (SNAPSHOT 20091019) for context '/jsfreg'

Jun 28, 2010 4:49:24 PM com.sun.faces.config.ConfigManager initialize
INFO: Unsanitized stacktrace from failed start...
java.lang.NullPointerException
     at com.sun.faces.util.Util.loadClass(Util.java:200)
     at
com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:312)
     at
com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processHandlerClass(FaceletTaglibConfigProcessor.java:416)
     at
com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:370)
     at
com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:313)
     at
com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:262)
     at
com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:337)
     at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:219)
     at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
     at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
     at
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1276)
     at
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:624)
     at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:136)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558)
     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
     at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
     at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
     at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
     at java.lang.Thread.run(Thread.java:619)
Jun 28, 2010 4:49:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jun 28, 2010 4:49:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/jsfreg] startup failed due to previous errors
Jun 28, 2010 4:49:24 PM com.sun.faces.config.ConfigureListener
contextDestroyed
SEVERE: Unexpected exception when attempting to tear down the Mojarra
runtime
java.lang.IllegalStateException: Application was not properly
initialized at startup, could not find Factory:
javax.faces.application.ApplicationFactory
     at
javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804)
     at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)
     at
com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:104)
     at
com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:305)
     at
org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4011)
     at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4615)
     at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4512)
     at
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1276)
     at
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:624)
     at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:136)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558)
     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
     at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
     at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
     at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
     at java.lang.Thread.run(Thread.java:619)

Michael


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message