gpt4 book ai didi

eclipse - 使用eclipse和tomcat部署项目出错

转载 作者:行者123 更新时间:2023-11-28 23:42:05 25 4
gpt4 key购买 nike

我不确定发生了什么,但我无法使用 eclipse 部署我的项目...它在几天前工作,现在我不断收到相同的错误

任何帮助将不胜感激......这就是我得到的:

SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4149)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Sep 13, 2013 2:04:06 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Sep 13, 2013 2:04:06 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Sep 13, 2013 2:04:06 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/activate] startup failed due to previous errors
Sep 13, 2013 2:04:06 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Sep 13, 2013 2:04:07 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Sep 13, 2013 2:04:07 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Sep 13, 2013 2:04:07 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Sep 13, 2013 2:04:07 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Sep 13, 2013 2:04:07 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Sep 13, 2013 2:04:07 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Sep 13, 2013 2:04:07 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 13, 2013 2:04:07 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Sep 13, 2013 2:04:07 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
Sep 13, 2013 2:04:07 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 935 ms

最佳答案

ContextLoaderListener 是 spring-web 的一部分,所以首先它应该在您的 web 项目的“Maven Dependencies”下可见(当然您的 web 项目必须是带有 maven 的动态 web 项目性质)。

对于 Eclipse“Kepler”,我们遇到了一个问题,即在执行“Maven->Update Project”之后,服务器启动的依赖项解析丢失了。

右键单击 Web 项目 -> 属性 -> 部署程序集进行检查。 Maven 依赖项应该在源列中,并以 WEB-INF/lib 作为目标。否则,您必须使用“Add..->Java Build Path Entries -> Maven Dependencies”来添加它。

关于eclipse - 使用eclipse和tomcat部署项目出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18793530/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com