Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error configuring application listener

 
Matthew Snow
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to deploy a small facelets app to tomcat 5.5.17 and I keep getting this error. These are the jars I'm using and the tomcat log:

commons-beanutils 1.7.0
commons-digester 1.8
jsf-api 1.2
jsf-impl 1.2
jsf-facelets 1.1.12
jstl 1.0

ay 16, 2007 9:19:59 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Java\jre1.6.0_01\bin;.
May 16, 2007 9:19:59 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 16, 2007 9:19:59 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2203 ms
May 16, 2007 9:19:59 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 16, 2007 9:19:59 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
May 16, 2007 9:19:59 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 16, 2007 9:20:01 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class com.sun.faces.config.GlassFishConfigureListener
java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3678)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
May 16, 2007 9:20:01 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
May 16, 2007 9:20:01 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 16, 2007 9:20:01 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/JSF-Test] startup failed due to previous errors
May 16, 2007 9:20:01 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 16, 2007 9:20:02 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 16, 2007 9:20:02 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/110 config=null
May 16, 2007 9:20:02 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
May 16, 2007 9:20:02 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3016 ms
 
Matthew Snow
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved. It has to do with Tomcat 5.0 not supporting the Servlet Spec v2.5 or above, it only supports 2.4. To get JSF to work then, you need to use version 1.1_01. Also, jars el-api and el-ri also need to be included in the classpath for facelets to work. So the final class path looks like this.

commons-beanutils 1.7.0
commons-digester 1.8
el-api 1.0
el-ri 1.0
jsf-api 1.1_01
jsf-impl 1.1_01
jsf-facelets 1.1.12
jstl 1.0
standard 1.1.2
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic