-1

Helo All,我是 Struts 的新手,为了成为开发人员,我需要精通 Struts .. 但是,我应该自学,现在,当我添加struts.xml时遇到问题

当我添加struts.xml时,结果总是显示请求的资源不可用。 当我删除它时,它会在没有 Struts 的情况下运行良好......

我已经学习了许多使用 struts 的简单教程,但没有一个适用于我的..

我认为,我的控制台日志中没有错误...

Apr 10, 2013 10:17:39 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based
Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
C:\Program
Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program
Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files
(x86)\NVIDIA
Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth
Software\syswow64;C:\Program Files (x86)\ATI
Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL
Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL
Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL
Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL
Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL
Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL
Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files
(x86)\Microsoft Visual Studio
9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Common Files\Microsoft
Shared\Windows Live;. Apr 10, 2013 10:17:40 AM
org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING:
[SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property 'source' to 'org.eclipse.jst.jee.server:TryAgain' did not
find a matching property. Apr 10, 2013 10:17:40 AM
org.apache.coyote.AbstractProtocol init INFO: Initializing
ProtocolHandler ["http-bio-8080"] Apr 10, 2013 10:17:40 AM
org.apache.coyote.AbstractProtocol init INFO: Initializing
ProtocolHandler ["ajp-bio-8009"] Apr 10, 2013 10:17:40 AM
org.apache.catalina.startup.Catalina load INFO: Initialization
processed in 893 ms Apr 10, 2013 10:17:40 AM
org.apache.catalina.core.StandardService startInternal INFO: Starting
service Catalina Apr 10, 2013 10:17:40 AM
org.apache.catalina.core.StandardEngine startInternal INFO: Starting
Servlet Engine: Apache Tomcat/7.0.39 Apr 10, 2013 10:17:41 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Parsing
configuration file [struts-default.xml] Apr 10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Unable
to locate configuration files of the name struts-plugin.xml, skipping
Apr 10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Parsing
configuration file [struts-plugin.xml] Apr 10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Parsing
configuration file [struts.xml] Apr 10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Choosing
bean (struts) for (com.opensymphony.xwork2.ObjectFactory) Apr 10, 2013
10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.FileManagerFactory) Apr 10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Choosing
bean (struts) for
(com.opensymphony.xwork2.conversion.impl.XWorkConverter) Apr 10, 2013
10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.conversion.impl.CollectionConverter) Apr 10,
2013 10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger
info INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.conversion.impl.ArrayConverter) Apr 10, 2013
10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.conversion.impl.DateConverter) Apr 10, 2013
10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.conversion.impl.NumberConverter) Apr 10, 2013
10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.conversion.impl.StringConverter) Apr 10, 2013
10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor) Apr
10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Choosing
bean (struts) for
(com.opensymphony.xwork2.conversion.ConversionFileProcessor) Apr 10,
2013 10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger
info INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor) Apr
10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Choosing
bean (struts) for
(com.opensymphony.xwork2.conversion.TypeConverterCreator) Apr 10, 2013
10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.conversion.TypeConverterHolder) Apr 10, 2013
10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.TextProvider) Apr 10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Choosing
bean (struts) for (com.opensymphony.xwork2.LocaleProvider) Apr 10,
2013 10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger
info INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.ActionProxyFactory) Apr 10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Choosing
bean (struts) for
(com.opensymphony.xwork2.conversion.ObjectTypeDeterminer) Apr 10, 2013
10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for
(org.apache.struts2.dispatcher.mapper.ActionMapper) Apr 10, 2013
10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (jakarta) for
(org.apache.struts2.dispatcher.multipart.MultiPartRequest) Apr 10,
2013 10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger
info INFO: Choosing bean (struts) for
(org.apache.struts2.views.freemarker.FreemarkerManager) Apr 10, 2013
10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Choosing bean (struts) for
(org.apache.struts2.components.UrlRenderer) Apr 10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Choosing
bean (struts) for
(com.opensymphony.xwork2.validator.ActionValidatorManager) Apr 10,
2013 10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger
info INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.util.ValueStackFactory) Apr 10, 2013 10:17:42
AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO:
Choosing bean (struts) for
(com.opensymphony.xwork2.util.reflection.ReflectionProvider) Apr 10,
2013 10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger
info INFO: Choosing bean (struts) for
(com.opensymphony.xwork2.util.reflection.ReflectionContextFactory) Apr
10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Choosing
bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher) Apr
10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Choosing
bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader)
Apr 10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Choosing
bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager) Apr
10, 2013 10:17:42 AM
com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Choosing
bean (struts) for (org.apache.struts2.views.util.UrlHelper) Apr 10,
2013 10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger
info INFO: Loading global messages from [ApplicationResources] Apr 10,
2013 10:17:42 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger
error SEVERE: Dispatcher initialization failed Unable to load
configuration. - action -
file:/C:/apache-tomcat-7.0.39/wtpwebapps/TryAgain/WEB-INF/classes/struts.xml:18:54
  at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
  at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)   at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)
  at
org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
  at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
  at
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
  at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
  at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
  at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4746)
  at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5399)
  at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
  at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
  at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)  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: Action class
[HelloWorld] not found - action -
file:/C:/apache-tomcat-7.0.39/wtpwebapps/TryAgain/WEB-INF/classes/struts.xml:18:54
  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:543)
  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)
  ... 17 more

Apr 10, 2013 10:17:42 AM org.apache.catalina.core.StandardContext
filterStart SEVERE: Exception starting filter Struts2Filter Unable to
load configuration. - action -
file:/C:/apache-tomcat-7.0.39/wtpwebapps/TryAgain/WEB-INF/classes/struts.xml:18:54
  at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:485)
  at
org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
  at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
  at
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
  at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
  at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
  at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4746)
  at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5399)
  at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
  at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
  at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)  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:/C:/apache-tomcat-7.0.39/wtpwebapps/TryAgain/WEB-INF/classes/struts.xml:18:54
  at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
  at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)   at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)
  ... 15 more Caused by: Action class [HelloWorld] not found - action -
file:/C:/apache-tomcat-7.0.39/wtpwebapps/TryAgain/WEB-INF/classes/struts.xml:18:54
  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:543)
  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)
  ... 17 more

Apr 10, 2013 10:17:42 AM org.apache.catalina.core.StandardContext
startInternal SEVERE: Error filterStart Apr 10, 2013 10:17:42 AM
org.apache.catalina.core.StandardContext startInternal SEVERE: Context
[/TryAgain] startup failed due to previous errors Apr 10, 2013
10:17:42 AM org.apache.catalina.startup.HostConfig deployWAR INFO:
Deploying web application archive
C:\apache-tomcat-7.0.39\webapps\FirstStruts-Try2.war Apr 10, 2013
10:17:44 AM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.ClassNotFoundException:
org.apache.struts2.dispatcher.StrutsPrepareAndExecuteFilter   at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
  at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
  at
org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527)
  at
org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509)
  at
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137)
  at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
  at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
  at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4746)
  at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5399)
  at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
  at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
  at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
  at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
  at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)   at java.util.concurrent.FutureTask$Sync.innerRun(Unknown
Source)   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)

Apr 10, 2013 10:17:44 AM org.apache.catalina.core.StandardContext
startInternal SEVERE: Error filterStart Apr 10, 2013 10:17:44 AM
org.apache.catalina.core.StandardContext startInternal SEVERE: Context
[/FirstStruts-Try2] startup failed due to previous errors Apr 10, 2013
10:17:44 AM org.apache.catalina.startup.HostConfig deployWAR INFO:
Deploying web application archive
C:\apache-tomcat-7.0.39\webapps\StrutsHelloWorld.war Apr 10, 2013
10:17:44 AM com.opensymphony.xwork2.util.logging.commons.CommonsLogger
error SEVERE: Dispatcher initialization failed
java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException   at
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:301)
  at
com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
  at
com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:207)
  at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)   at
com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:93)
  at
com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:487)
  at
com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:484)
  at
com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:584)
  at
com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
  at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:323)
  at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:221)
  at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
  at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)   at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)
  at
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
  at
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
  at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
  at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
  at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4746)
  at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5399)
  at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
  at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
  at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
  at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
  at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)   at java.util.concurrent.FutureTask$Sync.innerRun(Unknown
Source)   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.reflect.InvocationTargetException   at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)   at
java.lang.reflect.Method.invoke(Unknown Source)   at
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)
  ... 31 more Caused by: java.lang.ExceptionInInitializerError  at
com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:84)
  ... 36 more Caused by: java.lang.IllegalArgumentException: Javassist
library is missing in classpath! Please add missed dependency!  at
ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:168)   ... 37 more Caused
by: java.lang.ClassNotFoundException: javassist.ClassPool   at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
  at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
  at java.lang.Class.forName0(Native Method)  at
java.lang.Class.forName(Unknown Source)   at
ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:165)   ... 37 more

Apr 10, 2013 10:17:44 AM org.apache.catalina.core.StandardContext
filterStart SEVERE: Exception starting filter struts2
java.lang.reflect.InvocationTargetException - Class:
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector File:
ContainerImpl.java Method: inject Line: 301 -
com/opensymphony/xwork2/inject/ContainerImpl.java:301:-1  at
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:485)  at
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
  at
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
  at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
  at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
  at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4746)
  at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5399)
  at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
  at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
  at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
  at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
  at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)   at java.util.concurrent.FutureTask$Sync.innerRun(Unknown
Source)   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.RuntimeException:
java.lang.reflect.InvocationTargetException   at
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:301)
  at
com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
  at
com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:207)
  at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)   at
com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:93)
  at
com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:487)
  at
com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:484)
  at
com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:584)
  at
com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
  at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:323)
  at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:221)
  at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
  at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)   at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)
  ... 18 more Caused by: java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)   at
java.lang.reflect.Method.invoke(Unknown Source)   at
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)
  ... 31 more Caused by: java.lang.ExceptionInInitializerError  at
com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:84)
  ... 36 more Caused by: java.lang.IllegalArgumentException: Javassist
library is missing in classpath! Please add missed dependency!  at
ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:168)   ... 37 more Caused
by: java.lang.ClassNotFoundException: javassist.ClassPool   at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
  at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
  at java.lang.Class.forName0(Native Method)  at
java.lang.Class.forName(Unknown Source)   at
ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:165)   ... 37 more

Apr 10, 2013 10:17:44 AM org.apache.catalina.core.StandardContext
startInternal SEVERE: Error filterStart Apr 10, 2013 10:17:44 AM
org.apache.catalina.core.StandardContext startInternal SEVERE: Context
[/StrutsHelloWorld] startup failed due to previous errors Apr 10, 2013
10:17:44 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory
C:\apache-tomcat-7.0.39\webapps\docs Apr 10, 2013 10:17:44 AM
org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying
web application directory C:\apache-tomcat-7.0.39\webapps\examples Apr
10, 2013 10:17:45 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized() Apr 10, 2013 10:17:45 AM
org.apache.catalina.core.ApplicationContext log INFO: SessionListener:
contextInitialized() Apr 10, 2013 10:17:45 AM
org.apache.catalina.core.ApplicationContext log INFO: ContextListener:
attributeAdded('org.apache.jasper.compiler.TldLocationsCache',
'org.apache.jasper.compiler.TldLocationsCache@634fbcac') Apr 10, 2013
10:17:45 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory
C:\apache-tomcat-7.0.39\webapps\host-manager Apr 10, 2013 10:17:45 AM
org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying
web application directory C:\apache-tomcat-7.0.39\webapps\manager Apr
10, 2013 10:17:45 AM org.apache.catalina.startup.HostConfig
deployDirectory INFO: Deploying web application directory
C:\apache-tomcat-7.0.39\webapps\ROOT Apr 10, 2013 10:17:45 AM
org.apache.coyote.AbstractProtocol start INFO: Starting
ProtocolHandler ["http-bio-8080"] Apr 10, 2013 10:17:45 AM
org.apache.coyote.AbstractProtocol start INFO: Starting
ProtocolHandler ["ajp-bio-8009"] Apr 10, 2013 10:17:45 AM
org.apache.catalina.startup.Catalina start INFO: Server startup in
4929 ms

我使用了这些库作为教程给出

asm-3.3.jar      
asm-commons-3.3.jar      
asm-tree-3.3.jar      
commons-fileupload-1.2.2.jar      
commons-io-2.0.1.jar      
commons-lang3-3.1.jar      
freemarker-2.3.19.jar      
javassist-3.11.0.GA.jar      
log4j-1.2.9.jar      
ognl-3.0.6.jar      
struts2-core-2.3.12.jar      
xwork-core-2.3.12.jar      
4

1 回答 1

0

你怎么可能认为你的日志中没有错误?

SEVERE: Exception starting filter struts2
java.lang.ClassNotFoundException:
org.apache.struts2.dispatcher.StrutsPrepareAndExecuteFilter   at

这是真的,没有这样的课程。过滤器是:

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

看起来您也有许多类/库问题,可能是由版本冲突引起的。

于 2013-04-10T15:21:09.357 回答