java.lang.NoClassDefFoundError:org / apache / commons / digester / Digester Apache 7

时间:2013-09-26 12:43:37

标签: jsf tomcat7

您好我正在尝试一起使用以下技术:

  • MyFaces 2.1.12
  • jstl 1.2
  • Apache 7

但是在尝试运行我的应用程序时,我得到以下异常:

java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
    at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.<init>(DigesterFacesConfigUnmarshallerImpl.java:42)
    at org.apache.myfaces.config.DefaultFacesConfigurationProvider.getUnmarshaller(DefaultFacesConfigurationProvider.java:93)
    at org.apache.myfaces.config.DefaultFacesConfigurationProvider.getStandardFacesConfig(DefaultFacesConfigurationProvider.java:135)
    at org.apache.myfaces.config.DefaultFacesConfigurationMerger.getFacesConfigData(DefaultFacesConfigurationMerger.java:69)
    at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:416)
    at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:370)
    at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
    at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:143)
    at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:119)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.digester.Digester

这非常令人不安,因为我在项目中链接了commons-digester3-3.2.jar,将它放在“Web-INF”下的lib目录中并将其添加到java构建路径中......出了什么问题?

谢谢,

1 个答案:

答案 0 :(得分:0)

使用commons-digester 1.8版。 commons-digester3已经有很多变化。