在tomcat可以正常启动,配置到myeclipse里面就报错了。为什么?报错-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

在tomcat可以正常启动,配置到myeclipse里面就报错了。为什么?报错

爱吃鱼的程序员 2020-06-08 20:45:02 62

  • 求指点
    Unable to load configuration. - bean - jar:file:/E:/maven/repository/org/apache/struts/struts2-core/2.3.16/struts2-core-2.3.16.jar!/struts-default.xml:40:72
    	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
    	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
    	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
    	at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
    	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
    	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
    	at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
    	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
    	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4001)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4651)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
    	at org.apache.catalina.startup.Embedded.start(Embedded.java:825)
    	at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:558)
    	at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:255)
    	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:601)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    	at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
    Caused by: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/E:/maven/repository/org/apache/struts/struts2-core/2.3.16/struts2-core-2.3.16.jar!/struts-default.xml:40:72
    	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
    	at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:234)
    	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    	... 39 more
    Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name struts has already been loaded by bean - jar:file:/F:/work/tuha-m2/src/main/webapp/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72 - bean - jar:file:/E:/maven/repository/org/apache/struts/struts2-core/2.3.16/struts2-core-2.3.16.jar!/struts-default.xml:40:72
    	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:229)
    	... 42 more
    十一月 14, 2016 3:27:13 下午 org.apache.catalina.core.StandardContext filterStart
    严重: Exception starting filter struts2
    Unable to load configuration. - bean - jar:file:/E:/maven/repository/org/apache/struts/struts2-core/2.3.16/struts2-core-2.3.16.jar!/struts-default.xml:40:72
    	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)
    	at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
    	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
    	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
    	at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
    	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
    	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4001)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4651)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
    	at org.apache.catalina.startup.Embedded.start(Embedded.java:825)
    	at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:558)
    	at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:255)
    	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:601)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    	at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
    Caused by: Unable to load configuration. - bean - jar:file:/E:/maven/repository/org/apache/struts/struts2-core/2.3.16/struts2-core-2.3.16.jar!/struts-default.xml:40:72
    	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
    	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
    	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
    	... 37 more
    Caused by: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/E:/maven/repository/org/apache/struts/struts2-core/2.3.16/struts2-core-2.3.16.jar!/struts-default.xml:40:72
    	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
    	at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:234)
    	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    	... 39 more
    Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name struts has already been loaded by bean - jar:file:/F:/work/tuha-m2/src/main/webapp/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:40:72 - bean - jar:file:/E:/maven/repository/org/apache/struts/struts2-core/2.3.16/struts2-core-2.3.16.jar!/struts-default.xml:40:72
    	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:229)
    	... 42 more
    
    十一月 14, 2016 3:27:13 下午 org.apache.catalina.core.StandardContext start
    严重: Error filterStart
    十一月 14, 2016 3:27:13 下午 org.apache.catalina.core.StandardContext start
    严重: Context [/tuha-m2] startup failed due to previous errors
    十一月 14, 2016 3:27:13 下午 org.apache.catalina.core.ApplicationContext log

Java 应用服务中间件 Apache Maven
分享到
取消 提交回答
全部回答(1)
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

推荐文章
相似问题
推荐课程