gpt4 book ai didi

eclipse - 使用 Eclipse Tomcat Maven M2Eclipse 的 ClassNotFound W/Spring

转载 作者:行者123 更新时间:2023-11-28 23:06:53 24 4
gpt4 key购买 nike

抱歉,我是这个堆栈溢出的新手,所以请原谅底部的长错误消息。

我正在尝试使用 Eclipse 将名为 BroadLeaf 的项目部署到 Tomcat 7 服务器。我已经安装了 M2Eclipse/WTP 集成。我以干净的包为目标运行了一个 Maven 配置(通过 Eclipse)。然后我刷新并尝试启动服务器,但是它失败了。

更新:我正在尝试部署在这里找到的项目... https://broadleaf.svn.sourceforge.net/svnroot/broadleaf/trunk/BroadleafCommerce/site/BroadleafCommerceDemo/pom.xml

有什么想法吗?

java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1664) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:406) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:388) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:117) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4268) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4771) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:772) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:424) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:648) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.startup.Catalina.start(Catalina.java:576) 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:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415) Sep 27, 2011 8:41:12 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class org.broadleafcommerce.profile.web.extensibility.MergeContextLoaderListener java.lang.ClassNotFoundException: org.broadleafcommerce.profile.web.extensibility.MergeContextLoaderListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1664) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:406) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:388) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:117) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4268) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4771) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:772) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:424) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:648) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.startup.Catalina.start(Catalina.java:576) 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:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415) Sep 27, 2011 8:41:12 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class org.springframework.security.web.session.HttpSessionEventPublisher java.lang.ClassNotFoundException: org.springframework.security.web.session.HttpSessionEventPublisher at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1664) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:406) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:388) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:117) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4268) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4771) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:772) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:424) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:648) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138) at org.apache.catalina.startup.Catalina.start(Catalina.java:576) 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:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415) Sep 27, 2011 8:41:12 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Sep 27, 2011 8:41:12 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart Sep 27, 2011 8:41:12 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/broadleaf] startup failed due to previous errors

最佳答案

问题似乎是 WTP 没有与 Maven 依赖项正确集成。这不是我解决问题的最佳解决方案....

  1. 在 Eclipse 中右键单击项目并转到属性
  2. 转到部署程序集
  3. 点击添加
  4. 选择 Java 构建路径条目
  5. 选择所有 M2_HOME 条目。
  6. 清理构建和部署项目不要将 M2ECLIPSE 插件与 ECLIPSE 一起使用:ECLIPSE!
  7. 应该可以帮助您解决错误。

有人知道真正的解决方案吗?

更新:另外,下次我导入 WTP 时似乎与 Maven 相得益彰,所以可能在安装插件后删除并重新导入您的项目?

关于eclipse - 使用 Eclipse Tomcat Maven M2Eclipse 的 ClassNotFound W/Spring,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7577230/

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