UnsupportedOperationException loading simple JSF/Facelets page

I have the beginnings of a new JSF/Facelets app up and running locally using

apache-tomcat-5.5.12

jdk1.5.0_05

server side I am running tomcat-5.5.9 and it looks like JDK1.5.0_05

but when I WAR everything up and deploy it to my server and browse to

http://davesplanet.net:8080/PaperTrade/index.jsf

I get

java.lang.UnsupportedOperationException

javax.faces.application.Application.getELResolver(Application.java:443)

com.sun.faces.context.FacesContextImpl.getELContext(FacesContextImpl.java:172)

javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:900)

com.sun.faces.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:366)

com.sun.facelets.FaceletViewHandler.createView(FaceletViewHandler.java:782)

org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:141)

org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:64)

javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)

The WAR's WEB-INF/lib contains mostly files downloaded from the June 6 facelets-1.1.9 draft release:

11/09/2006 04:49 PM 118,726 commons-beanutils-1.6.jar

06/12/2006 10:29 AM 118,726 commons-beanutils.jar

11/09/2006 04:49 PM 46,725 commons-codec-1.3.jar

11/09/2006 04:49 PM 165,119 commons-collections-2.1.jar

06/12/2006 10:29 AM 165,119 commons-collections.jar

11/09/2006 04:49 PM 139,966 commons-digester-1.7.jar

06/12/2006 10:29 AM 109,096 commons-digester.jar

11/09/2006 04:49 PM 68,756 commons-logging-1.0.3.jar

06/12/2006 10:29 AM 68,756 commons-logging.jar

06/12/2006 10:29 AM 24,432 el-api.jar

06/12/2006 10:29 AM 97,471 el-ri.jar

06/12/2006 10:29 AM 315,382 jsf-api.jar

11/09/2006 04:49 PM 291,366 jsf-facelets.jar

06/12/2006 10:29 AM 1,136,609 jsf-impl.jar

06/12/2006 10:29 AM 50,491 jsp-api.jar

11/09/2006 04:49 PM 21,029 jstl.jar

05/02/2006 09:54 PM 112,249 junit-4.1.jar

06/12/2006 10:29 AM 6,882 maven-repository-importer-1.1.jar

06/12/2006 10:29 AM 252,186 myfaces-api-1.1.3-SNAPSHOT.jar

06/12/2006 10:29 AM 516,661 myfaces-impl-1.1.3-SNAPSHOT.jar

11/09/2006 04:49 PM 246,317 mysql-connector-java-3.0.17-ga-bin.jar

06/12/2006 10:29 AM 15,420 portlet.jar

11/09/2006 04:49 PM 393,259 standard.jar

the very simplified index.jspx looks like this:

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns="http://www.w3.org/1999/xhtml" version="2.0"

xmlns:ui="http://java.sun.com/jsf/facelets"

xmlns:f="http://java.sun.com/jsf/core"

xmlns:h="http://java.sun.com/jsf/html">

<f:view>

Welcome to PaperTrade.net!

</f:view>

</jsp:root>

I get noting in the logs when I shift-reload the web page, even after restarting Tomcat. Interesting, in preparing this post I killed the logs and restarted Tomcat and I get a clean startup in catalina.err but in catalina.out I find this apparent startup problem:

...

[Loaded javax.faces.event.PhaseListener from file:/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/PaperTrade/WEB-INF/lib/jsf-api.jar]

[Loaded javax.faces.event.PhaseEvent from file:/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/PaperTrade/WEB-INF/lib/jsf-api.jar]

[Loaded javax.faces.convert.EnumConverter from file:/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/PaperTrade/WEB-INF/lib/jsf-api.jar]

[Loaded javax.servlet.jsp.JspFactory from file:/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/PaperTrade/WEB-INF/lib/jsp-api.jar]

[Loaded com.sun.el.ExpressionFactoryImpl from file:/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/PaperTrade/WEB-INF/lib/el-ri.jar]

[Loaded com.sun.el.ValueExpressionLiteral from file:/usr/local/jakarta/jakarta-tomcat-5.5.9/webapps/PaperTrade/WEB-INF/lib/el-ri.jar]

Nov 12, 2006 9:53:40 PM com.sun.faces.config.ConfigureListener registerELResolverAndListenerWithJsp

SEVERE: Error Instantiating ExpressionFactory

java.lang.NullPointerException

at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1876)

at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:565)

at com.sun.faces.config.GlassFishConfigureListener.contextInitialized(GlassFishConfigureListener.java:46)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:788)

at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:677)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473)

...

Alright, I've beat my head against the wall enough tonight, time to break down and beg for help. Thanks!

[5204 byte] By [DavesPlaneta] at [2007-10-3 9:40:36]
# 1
That release of Facelets has a *very* old version of JSF 1.2. Please download the latest from https://javaserverfaces.dev.java.net.
rlubkea at 2007-7-15 4:56:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

The latest and greatest JSF jars are what I originally started with, except they explode when used with the most current Facelets jars, took me a bit to figure out I had to use the JSF that came with Facelets in order to get Facelets to work.

Nov 13, 2006 10:41:39 PM org.apache.coyote.http11.Http11BaseProtocol init

INFO: Initializing Coyote HTTP/1.1 on http-8080

Nov 13, 2006 10:41:39 PM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 1452 ms

Nov 13, 2006 10:41:39 PM org.apache.catalina.core.StandardService start

INFO: Starting service Catalina

Nov 13, 2006 10:41:39 PM org.apache.catalina.core.StandardEngine start

INFO: Starting Servlet Engine: Apache Tomcat/5.5.12

Nov 13, 2006 10:41:39 PM org.apache.catalina.core.StandardHost start

INFO: XML validation disabled

Nov 13, 2006 10:41:42 PM org.apache.catalina.core.StandardContext listenerStart

SEVERE: Error configuring application listener of class com.sun.faces.config.Gla

ssFishConfigureListener

java.lang.ClassNotFoundException: com.sun.faces.config.GlassFishConfigureListene

r

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa

der.java:1338)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa

der.java:1187)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContex

t.java:3640)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4

127)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442

)

at org.apache.catalina.core.StandardService.start(StandardService.java:4

50)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:680

)

at org.apache.catalina.startup.Catalina.start(Catalina.java:536)

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:275)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Nov 13, 2006 10:41:42 PM org.apache.catalina.core.StandardContext listenerStart

SEVERE: Skipped installing application listeners due to previous error(s)

Nov 13, 2006 10:41:42 PM org.apache.catalina.core.StandardContext start

SEVERE: Error listenerStart

Nov 13, 2006 10:41:42 PM org.apache.catalina.core.StandardContext start

SEVERE: Context [] startup failed due to previous errors

Nov 13, 2006 10:41:44 PM org.apache.coyote.http11.Http11BaseProtocol start

INFO: Starting Coyote HTTP/1.1 on http-8080

Nov 13, 2006 10:41:44 PM org.apache.jk.common.ChannelSocket init

INFO: JK: ajp13 listening on /0.0.0.0:8009

Nov 13, 2006 10:41:44 PM org.apache.jk.server.JkMain start

INFO: Jk running ID=0 time=0/220 config=null

Nov 13, 2006 10:41:45 PM org.apache.catalina.startup.Catalina start

INFO: Server startup in 5568 ms

DavesPlaneta at 2007-7-15 4:56:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
When changing libraries in Tomcat, you'll want to delete the contents of CATALINA_HOME/work and then restart the server.
rlubkea at 2007-7-15 4:56:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

Got it (finally). There were two things that needed changed.

Had to revert back to an OLDER version of JSF (jsf-1.1_02-b08) since the newer version isn't compatible with the version of JSP that Tomcat 5.5.x runs

Also had to delete the JSP-API.jar that I was including in my WAR.

The two things together, plus the delay of having to upload the war, made this a ****** to solve. Thanks everyone! I'm glad I asked for help on this one.

DavesPlaneta at 2007-7-15 4:56:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

Hi,

I have seen some articles saying that combination of tomcat 5.5.x, JSF 1.2 and and facelets can be used together. How far is this correct? Because, I would like to use Rich faces from jBoss. But, it seems, JSF 1.1 has some issues. So I would like to use JSF1.2. Once again the problem here is, tomcat 6.0 is not a stable version now (Supports JSP Spec 2.1). Please somebody help in this regard? And also, as an addon question to this, are facelets going to be part of JSF in future?

Thanks

Swamy S

skrlswamya at 2007-7-15 4:56:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...