Struts2实现文件上传报错(三)

1、具体错误如下

usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ]  { -help | start | stop }
2014-5-1 23:17:23 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.27 using APR version 1.4.6.
2014-5-1 23:17:23 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2014-5-1 23:17:24 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized (OpenSSL 1.0.1d 5 Feb 2013)
2014-5-1 23:17:24 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-apr-8686"]
2014-5-1 23:17:24 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-apr-8009"]
2014-5-1 23:17:24 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1086 ms
2014-5-1 23:17:24 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
2014-5-1 23:17:24 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.41
2014-5-1 23:17:24 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\MyEclipse\workspace\UploadFile\WebRoot\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts-default.xml]
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts-plugin.xml]
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts.xml]
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.ObjectFactory)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ActionFactory)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ResultFactory)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ConverterFactory)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.InterceptorFactory)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.factory.ValidatorFactory)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.FileManagerFactory)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.XWorkConverter)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.CollectionConverter)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.ArrayConverter)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.DateConverter)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.NumberConverter)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.StringConverter)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionFileProcessor)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterCreator)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterHolder)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.TextProvider)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.LocaleProvider)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.ActionProxyFactory)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ObjectTypeDeterminer)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (org.apache.struts2.dispatcher.mapper.ActionMapper)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (jakarta) for (org.apache.struts2.dispatcher.multipart.MultiPartRequest)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (org.apache.struts2.views.freemarker.FreemarkerManager)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.validator.ActionValidatorManager)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionProvider)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionContextFactory)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (org.apache.struts2.views.util.UrlHelper)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.TextParser)
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Loading global messages from [message]
2014-5-1 23:17:25 com.opensymphony.xwork2.util.logging.jdk.JdkLogger error
严重: Dispatcher initialization failed
Unable to load configuration. - [unknown location]
	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.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$StartChild.call(ContainerBase.java:1559)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: Parent package is not defined: jfreechart-default - [unknown location]
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildPackageContext(XmlConfigurationProvider.java:670)
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:519)
	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:258)
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
	... 16 more
2014-5-1 23:17:25 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - [unknown location]
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)
	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$StartChild.call(ContainerBase.java:1559)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: Unable to load configuration. - [unknown location]
	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)
	... 14 more
Caused by: Parent package is not defined: jfreechart-default - [unknown location]
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildPackageContext(XmlConfigurationProvider.java:670)
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:519)
	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:258)
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
	... 16 more
2014-5-1 23:17:25 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
2014-5-1 23:17:25 org.apache.catalina.core.StandardContext startInternal
严重: Context [/UploadFile] startup failed due to previous errors
2014-5-1 23:17:25 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.41\webapps\docs
2014-5-1 23:17:25 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.41\webapps\examples
2014-5-1 23:17:26 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2014-5-1 23:17:26 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2014-5-1 23:17:26 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1b595f3')
2014-5-1 23:17:26 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.41\webapps\host-manager
2014-5-1 23:17:26 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.41\webapps\manager
2014-5-1 23:17:26 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.41\webapps\ROOT
2014-5-1 23:17:26 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-8686"]
2014-5-1 23:17:26 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8009"]
2014-5-1 23:17:26 org.apache.catalina.startup.Catalina start
信息: Server startup in 2141 ms

2、错误原因

struts.xml中包继承jfreechart-default,但是项目中没有导入jfreechart-1.0.17.jar和struts2-jfreechart-plugin-2.3.16.jar

3、解决办法

在WEB-INF下的lib目录中导入jfreechart-1.0.17.jar和struts2-jfreechart-plugin-2.3.16.jar

上一篇:[人工智能-深度学习-29]:卷积神经网络CNN - 全连接网络与卷积网络结构的互为等效与性能比较


下一篇:jquerymobile实例介绍