Skip to main content

UnsupportedOperationException loading simple JSF/Facelets page

2 replies [Last post]
davesplanet
Offline
Joined: 2006-06-16
Points: 0

I have the beginnings of a new JSF/Facelets app up and running locally using
apache-tomcat-5.5.12
jdk1.5.0_05

but when I WAR everything up and deploy it to my server
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 jar'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:

Welcome to PaperTrade.net!

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!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dslindsay73
Offline
Joined: 2006-12-01
Points: 0

I am getting this same issue while trying to get the Php to Java Bridge to work:

[#|2006-12-04T11:24:23.209-0500|SEVERE|sun-appserver-pe9.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=httpWorkerThread-8080-1;_RequestID=5a2fe82f-948d-46a5-8435-69238fd86a21;|StandardWrapperValve[PhpFacesServlet]: PWC1406: Servlet.service() for servlet PhpFacesServlet threw exception
java.lang.UnsupportedOperationException
at javax.faces.application.Application.getELResolver(Application.java:443)
at com.sun.faces.context.FacesContextImpl.getELContext(FacesContextImpl.java:175)
at javax.faces.context.FacesContext.getELContext(FacesContext.java:136)
at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:919)
at com.sun.faces.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:332)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:180)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:113)
at php.java.faces.FacesServlet.service(FacesServlet.java:87)

It should be noted that prior to this state, I had to add:

FacesServlet
javax.faces.webapp.FacesServlet
0

to the web.xml file of JavaBridge.war

Please see this link for a little more information to what I'm trying to do:
http://php-java-bridge.sourceforge.net/

davesplanet
Offline
Joined: 2006-06-16
Points: 0

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