struts2应用程序未运行

时间:2015-08-31 13:57:45

标签: java tomcat struts2

我是maven和struts2的新手。当我尝试运行我的程序时,会出现以下错误:

  

严重:调度程序初始化失败       无法加载配置。 - action - file:/ E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/eventsense3/WEB-INF/classes/struts.xml:26:48           在com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)           at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)           在org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)           在org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)           at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)           在org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)           在org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)           在org.apache.catalina.core.ApplicationFilterConfig。(ApplicationFilterConfig.java:105)           在org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4574)           at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5193)           在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)           在org.apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.java:1408)           在org.apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.java:1398)           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)           在java.lang.Thread.run(未知来源)       引起:找不到动作类[de.l3s.eumssi.action.TextSyncAction] - 动作 - 文件:/ E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/eventsense3 /WEB-INF/classes/struts.xml:26:48           在com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:482)           在com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:426)           在com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:552)           在com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:292)           at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)           在com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:250)           在com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)           ......还有16个

Aug 31, 2015 2:29:37 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
Unable to load configuration. - action - file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/eventsense3/WEB-INF/classes/struts.xml:26:48
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:502)
    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.initFilter(ApplicationFilterConfig.java:279)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4574)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5193)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    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: Unable to load configuration. - action - file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/eventsense3/WEB-INF/classes/struts.xml:26:48
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)
    ... 14 more
Caused by: Action class [de.l3s.eumssi.action.TextSyncAction] not found - action - file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/eventsense3/WEB-INF/classes/struts.xml:26:48
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:482)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:426)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:552)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:292)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:250)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    ... 16 more

Aug 31, 2015 2:29:37 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more Filters failed to start. Full details will be found in the appropriate container log file
Aug 31, 2015 2:29:37 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/EventSenseWebApp] startup failed due to previous errors
Aug 31, 2015 2:29:39 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Parsing configuration file [struts-default.xml]
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Parsing configuration file [struts-plugin.xml]
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Parsing configuration file [struts.xml]
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (cdi) for class com.opensymphony.xwork2.ObjectFactory
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for class com.opensymphony.xwork2.conversion.impl.XWorkConverter
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.TextProvider
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.ActionProxyFactory
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.conversion.ObjectTypeDeterminer
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for interface org.apache.struts2.dispatcher.mapper.ActionMapper
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (jakarta) for interface org.apache.struts2.dispatcher.multipart.MultiPartRequest
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for class org.apache.struts2.views.freemarker.FreemarkerManager
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for interface org.apache.struts2.components.UrlRenderer
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.validator.ActionValidatorManager
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.util.ValueStackFactory
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.util.reflection.ReflectionProvider
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.util.reflection.ReflectionContextFactory
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.util.PatternMatcher
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for interface org.apache.struts2.dispatcher.StaticContentLoader
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for interface com.opensymphony.xwork2.UnknownHandlerManager
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Overriding property struts.i18n.reload - old value: false new value: true
Aug 31, 2015 2:29:40 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Overriding property struts.configuration.xml.reload - old value: false new value: true
Aug 31, 2015 2:29:40 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NoClassDefFoundError: Ljavax/enterprise/inject/spi/BeanManager;
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Unknown Source)
    at java.lang.Class.getDeclaredFields(Unknown Source)
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:89)
    at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:71)
    at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:67)
    at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
    at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(ContainerImpl.java:348)
    at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:305)
    at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:301)
    at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
    at com.opensymphony.xwork2.inject.ContainerImpl.getConstructor(ContainerImpl.java:594)
    at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:491)
    at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:532)
    at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:581)
    at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:530)
    at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
    at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
    at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
    at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:507)
    at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:517)
    at com.opensymphony.xwork2.inject.ContainerImpl$9.call(ContainerImpl.java:548)
    at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)
    at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:546)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:197)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:436)
    at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4574)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5193)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    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: javax.enterprise.inject.spi.BeanManager
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1313)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1164)

1 个答案:

答案 0 :(得分:0)

在IDE中指定服务器路径(catalina base)和部署路径。