Line: 220 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
转自:http://blog.51cto.com/alinazh/1276363
在启动tomcat的时候出现错误:
Line: 220 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1 .
严重: Exception starting filter struts2
Class: com.opensymphony.xwork2.spring.SpringObjectFactory
File: SpringObjectFactory.java
Method: getClassInstance
Line: 220 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:195)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4356)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1215)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:220)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType(XmlConfigurationProvider.java:530)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes(XmlConfigurationProvider.java:501)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:457)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:275)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:204)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:380)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424)
... 20 more
原因及解决办法:
不要引入包:struts2-spring-plugin-2.2.3.jar.
就是这么简单。
需要注意的是,这里指的不要引入,是在web工程的WEBROOT/WEB-INF/lib中也不要有多余的包,之前我的问题是lib中的包有冲突,
只在工程的buildpath中不引入,这个是不能控制包的冲突的!!
类似的问题及解决
启动服务器时出现异常:
警告: Failed startup of context com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@1242b11{/,E:\workspace\uploadPhoto\war}
Class: com.opensymphony.xwork2.spring.SpringObjectFactory
File: SpringObjectFactory.java
Method: getClassInstance
Line: 209 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:209:-1
Caused
by: java.lang.NullPointerException at
com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:209)
原因两个:
1.lib中多导入包的大原因:去掉struts2-spring-plugin-2.1.8包即可,因为没有用到spring。
2.还有的原因是用spring了,却没加监听器,在web.xml里面加上
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
Line: 220 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1的更多相关文章
- struts2启动报错com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
好久没有搞struts2,今天配置strut2.2.1,启动时遇到个小问题.记录下. tomcat启动报错: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ...
- com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1问题出现的原因及解决办法
转自:https://blog.csdn.net/shinchan_/article/details/37818927 com/opensymphony/xwork2/spring/SpringObj ...
- SSH框架环境搭建问题:Line: 230 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:230:-1
只是通过myeclipse搭建一个框架而已 启动tomcat时报错信息: File: SpringObjectFactory.java Method: getClassInstance Line: 2 ...
- struts2启动报错:ERROR com.opensymphony.xwork2.conversion.impl.DefaultConversionPropertiesProcessor - Conversion registration error
[framework] 2019-12-05 11:34:05,441 - org.springframework.web.context.ContextLoader -5352 [RMI TCP C ...
- Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.util.classloader.ReloadingClassLoader
今天学习到strusts2与spring的整合,把原来可以交给spring产生的东西都扔给了它,终于拜托了繁琐的代码,只专心于逻辑开发就OK了,现在连strusts的action都可以交给spring ...
- java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/TextUtils
java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/String;)Ljava/lang ...
- java.lang.NoSuchMethodError: com.opensymphony.xwork2.config.ConfigurationManager.addConfigurationPro
java.lang.NoSuchMethodError: com.opensymphony.xwork2.config.ConfigurationManager.addConfigurationPro ...
- 异常HTTP Status 500 - Illegal access to constructor, is it public? java.lang.IllegalAccessException: Class com.opensymphony.xwork2.ObjectFactory can not access a member of class action.CoreAction with
Exception report message Illegal access to constructor, is it public? description The server encount ...
- java.lang.NoClassDefFoundError: Lcom/opensymphony/xwork2/util/logging/Logger tomcat6 启动错误
用tomcat6启动时,出现下面的错误Java.lang.NoClassDefFoundError: Lcom/opensymphony/xwork2/util/logging/Logger; Cau ...
随机推荐
- 第十八节:Scrapy爬虫框架之settings文件详解
# -*- coding: utf-8 -*- # Scrapy settings for maoyan project## For simplicity, this file contains on ...
- 杭电 5053 the Sum of Cube(求区间内的立方和)打表法
Description A range is given, the begin and the end are both integers. You should sum the cube of al ...
- source insight中的快捷键总结
1.快捷键 1,Shift+F8高亮显示指定字符. 2,Ctrl+F找出来的结果用F4,F3前进后退查找. 3,Alt+,后退alt+.前进查找关键字. 4,Alt+G或者F5跳转到某个固定的行号. ...
- PS一些技巧
色阶的解决办法 我们做效果图的时候经常会使用大面积渐变,时常会出现比较严重的色阶问题,通常出现这些明显色阶的时候,可以通过使用高斯模糊对色阶进行模糊化处理. 在使用PS CC的过程中,笔者经常遇到假死 ...
- Jmeter-接口测试实例讲解
一.测试需求描述 1. 本次测试的接口为http服务端接口 2. 接口的主要分成两类,一类提供给查询功能接口,一类提供保存数据功能接口,这里我们举例2个保存数据的接口,因为这两个接口有关联性,比较有代 ...
- BNUOJ 5997 Fibonacci again and again
Fibonacci again and again Time Limit: 1000ms Memory Limit: 32768KB This problem will be judged on HD ...
- 听dalao讲课 7.27
1.高斯消元&线性基 也就是打大暴力啊 所谓的高斯消元也就是加减消元嘛,我的意识流高斯消元是可以的,没听到HY神犇讲,LZHdalao讲得很好,其实就是\(O(n^3)\)的暴力,别的地方一直 ...
- 【BZOJ3697】采药人的路径(点分治)
题意:采药人的药田是一个树状结构,每条路径上都种植着同种药材.采药人以自己对药材独到的见解,对每种药材进行了分类.大致分为两类,一种是阴性的,一种是阳性的.采药人每天都要进行采药活动.他选择的路径是很 ...
- readdir() 获取文件类型
readdir()获取文件类型 //// 字符设备文件 type =2, filename207=tty0 crw-rw---- 1 root root 4, 0 04-10 16:28 ...
- iLBC 压缩比
*---------------------------------------------------* * ...