spring和jsf项目

时间:2018-03-27 16:54:10

标签: spring jsf myfaces

我试图在eclipse上运行一个古老的Spring项目,我得到了这个错误:

GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1907)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1750)
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:534)
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:516)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:148)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5034)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5641)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1700)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1690)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

mars 27, 2018 5:51:35 PM org.apache.catalina.core.StandardContext listenerStart
GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) org.apache.myfaces.webapp.StartupServletContextListener
java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1907)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1750)
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:534)
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:516)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:148)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5034)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5641)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1700)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1690)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:2)

现在问题解决了,我有一些问题需要解决 eclipse底部面板中的Markers选项卡,主要问题是:

Cannot change version of project facet Dynamic Web Module to 3.0 

并且解决方案是更新标题  web.xml:

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Servlet 3.0 Web Application</display-name>
</web-app> 

然后只是 Maven - &gt;更新项目..