I have an existing JSF 2.0 project working on a Tomcat 7.0.4 server. I am trying to add Icefaces 2.0.0 Beta2 to this project. I downloaded the file ICEfaces-2.0.0-Beta2-bin.zip from Icefaces official homepage and followed the instructions described here.
I copied the 4 files icefaces.jar, icepush.jar, icefaces-ace.jar and icefaces-compat.jar from the ICEfaces-2.0.0-Beta2-bin/icefaces/lib directory to the WEB-INF/lib directory (the one that I included all my jars). The jsf-api.jar and jsf-impl.jar was already included in my project so these was not copied.
When I deployed the webapp to the Tomcat 7 server, following error occured:
/home/user > ant deploy reload
Buildfile: build.xml
build:
deploy:
reload:
[reload] FAIL - Encountered exception java.lang.IllegalStateException: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/wtree-www] has not been started
BUILD FAILED
FAIL - Encountered exception java.lang.IllegalStateException: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/wtree-www] has not been started
Total time: 0 seconds
This is from the catalina.log, I think this might be intresting:
INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
Nov 2, 2010 10:04:42 PM org.icepush.servlet.MainServlet <init>
INFO:
ICEsoft Technologies Inc.
ICEpush 2.0.0 Beta2
Build number: 13
Revision: 22877
Nov 2, 2010 10:04:43 PM org.icefaces.util.EnvConfig init
INFO: ICEfaces Configuration:
org.icefaces.render.auto: true [default]
org.icefaces.autoid: true [default]
org.icefaces.aria.enabled: true [default]
org.icefaces.blockUIOnSubmit: false [default]
org.icefaces.compressDOM: false [default]
org.icefaces.compressResources: true [default]
org.icefaces.connectionLostRedirectURI: null [default]
org.icefaces.deltaSubmit: false [default]
org.icefaces.lazyPush: true [default]
org.icefaces.sessionExpiredRedirectURI: null [default]
org.icefaces.standardFormSerialization: false [default]
org.icefaces.strictSessionTimeout: false [default]
org.icefaces.windowScopeExpiration = 1000 [default]
Nov 2, 2010 10:04:43 PM org.icefaces.impl.renderkit.DOMRenderKit <clinit>
INFO:
ICEsoft Technologies Inc.
ICEfaces 2.0.0 Beta2
Build number: 003
Revision: 22976
Nov 2, 2010 10:04:43 PM com.sun.faces.config.ConfigManager initialize
INFO: Unsanitized stacktrace from failed start...
com.sun.faces.config.ConfigurationException:
Source Document: jar:file:/opt/apache-tomcat-7.0.4/webapps/wtree-www/WEB-INF/lib/icefaces-compat.jar!/META-INF/faces-config.xml
Cause: Class 'com.icesoft.faces.component.effect.ApplyEffectRenderer' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:275)
at com.sun.faces.config.processor.RenderKitConfigProcessor.addRenderers(RenderKitConfigProcessor.java:309)
at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:175)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:110)
at com.sun.faces.config.processor.ManagedBeanConfigProcessor.process(ManagedBeanConfigProcessor.java:266)
at com.su .....
......
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.<clinit>(DomBasicRenderer.java:61)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
.....
Nov 2, 2010 10:04:43 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Nov 2, 2010 10:04:43 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/wtree-www] startup failed due to previous errors
I don’t understand how copying the 4 files can generate this error. I haven’t done anything else Can you please help me?
As usual, the
caused bypart of the exception stacktrace tells about the root cause of the problem. In your case it’s the following:This is pretty self-explaining. The mentioned class is missing in the runtime classpath. Add
commons-logging.jarto/WEB-INF/liband this particular problem should go. If you don’t already have it somewhere else (in IceFaces download maybe?) then you can just get it at http://commons.apache.org/logging.