atitit.解决struts2 SpringObjectFactory.getClassInstance NullPointerExceptionv2 q31

1. #--现象 java.lang.NullPointerException1

2. #----原因1

3. #---别的原因1

4. Spring的加载机制1

5. 参考2

1. #--现象 java.lang.NullPointerException

at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance
com.opensymphony.xwork2.spring.SpringObjectFactory  nullpointexcept.txt
九千一满好直了,猛个腊擦走不行兰.

作者 老哇的爪子 Attilax 艾龙,  EMAIL:1466519819@qq.com
转载请注明来源: http://www.cnblogs.com/attilax/

2. #----原因

maybe hb err...so .spr error .so ket...rej to ekshen...
can run sprutil...test

3. #---别的原因

1.原因是加多了一个包(jar冲突),把这个包删除就可以了
struts2-spring-plugin-2.0.11.jar
2.短了struts2-spring-plugin-2.0.11.jar
3.webxml 没配置spring action的listen

4. Spring的加载机制

<!-- 加载数据库中所有公用数据到缓存中  -->

<listener>

<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

</listener>

<context-param>

<param-name>contextConfigLocation</param-name>

<param-value>classpath:applicationContext.xml</param-value>

</context-param>

SpringObjectFactory.getClassInstance 是从classloader黑头load class的..

public Class getClassInstance(String className)

throws ClassNotFoundException {

Class clazz = null;

if (this.useClassCache) {

synchronized (this.classes) {

clazz = (Class) this.classes.get(className);

}

}

if (clazz == null) {

if (this.appContext.containsBean(className))

clazz = this.appContext.getBean(className).getClass();

else {

clazz = super.getClassInstance(className);

}

if (this.useClassCache) {

synchronized (this.classes) {

this.classes.put(className, clazz);

}

}

}

return clazz;

}

5. 参考

tomcat6启动出现的错误 Exception starting filter struts com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance - Chark-程序员BOLG - 博客频道 - CSDN.NET.htm
struts2启动报错com opensymphony xwork2 spring SpringObjectFactory.java 220 -1 - 吾生也有涯,而知也无涯 - ITeye技术网站.htm

atitit.解决struts2 SpringObjectFactory.getClassInstance NullPointerException  v2 q31的更多相关文章

  1. 知也atitit.解决struts2 SpringObjectFactory.getClassInstance NullPointerException  v2 q31无涯 - I

    atitit.解决struts2 SpringObjectFactory.getClassInstance NullPointerExceptionv2 q31 1. #--现象 java.lang. ...

  2. atitit.解决struts2 SpringObjectFactory.getClassInstance NullPointerException

    atitit.解决struts2 SpringObjectFactory.getClassInstance NullPointerException #--现象 java.lang.NullPoint ...

  3. Atitit s2018.6 s6 doc list on com pc.docx Atitit s2018.6 s6 doc list on com pc.docx  Aitit algo fix 算法系列补充.docx Atiitt 兼容性提示的艺术 attilax总结.docx Atitit 应用程序容器化总结 v2 s66.docx Atitit file cms api

    Atitit s2018.6 s6  doc list on com pc.docx Atitit s2018.6 s6  doc list on com pc.docx  Aitit algo fi ...

  4. Atitit 解决Unhandled event loop exception错误的办法

    Atitit 解决Unhandled event loop exception错误的办法 查看workspace/.metadata/.log org.eclipse.swt.SWTError: No ...

  5. atitit.api设计 方法 指南 手册 v2 q929.docx

    atitit.api设计 方法 指南 手册 v2 q929.docx atitit.api设计原则与方法 1. 归一化(锤子钉子理论)1 1.1. 链式方法2 1.2. 规则5:建立返回值类型2 1. ...

  6. atitit.解决net.sf.json.JSONException There is a cycle in the hierarchy

    atitit.解决net.sf.json.JSONException There is a cycle in the hierarchy 1. 环境:使用hibernate4跟个,,要不个哪的对象系列 ...

  7. atitit. 解决org.hibernate.SessionException Session is closed

    atitit. 解决org.hibernate.SessionException Session is closed   #--现象:: org.hibernate.SessionException ...

  8. 严重: Exception starting filter struts2 java.lang.NullPointerException (转载)

    严重: Exception starting filter struts2 java.lang.NullPointerException at com.opensymphony.xwork2.util ...

  9. 解决struts2中UI标签出现的问题: The Struts dispatcher cannot be found

    解决struts2中UI标签出现的问题: The Struts dispatcher cannot be found 异常信息: The Struts dispatcher cannot be fou ...

随机推荐

  1. java应用高cpu占用

    一个应用占用CPU很高,除了确实是计算密集型应用之外,通常原因都是出现了死循环 排查故障如下: 1.根据top命令,发现PID为28555的Java进程占用CPU高达200%,出现故障 2.通过ps ...

  2. 多表联合查询,利用 concat 模糊搜索

    select * from t1 as a join t2 as b on a.id = b.id where CONCAT(a.name,b.name) like '%测试%'

  3. CentOS 7 下Ansiable搭建命令列表 及常用监控指令

    根据文章 [  自动化运维工具Ansible详细部署 ] 搭建 ============================================================== 1.Ans ...

  4. java中的控制语句

    控制语句 1.1 顺序结构 (最常见的) 特点:代码从上往下依次执行 1.2 选择结构 : if 判断语句 : switch 判断语句: Switch语句使用的注意事项: 1.每一个语句结束后需要有一 ...

  5. POJ 2315:Football Game(博弈论)

    [题目链接] http://poj.org/problem?id=2315 [题目大意] 两名球员轮流从N个球中挑出不多于M个射门,每个球半径都是R,离球门S. 每次只能踢出L以内的距离.进最后一个球 ...

  6. POJ 3608 Bridge Across Islands (旋转卡壳)

    [题目链接] http://poj.org/problem?id=3608 [题目大意] 求出两个凸包之间的最短距离 [题解] 我们先找到一个凸包的上顶点和一个凸包的下定点,以这两个点为起点向下一个点 ...

  7. 【动态规划】Gym - 100507G - The Debut Album

    一般思路的dp是用f(i,j,0)表示前i位最后有j个1的方案数,用f(i,j,1)表示前j位最后有j个2的方案数,j都是大于等于1的,然后比较容易转移. 但这题卡内存,就只能用f(i,j)表示前i位 ...

  8. 【数论】【筛法求素数】【欧拉函数】bzoj2818 Gcd

    gcd(x,y)(1<=x,y<=n)为素数(暂且把(x,y)和(y,x)算一种) 的个数 <=> gcd(x/k,y/k)=1,k是x的质因数 的个数 <=> Σ ...

  9. 【set】bzoj3715 [PA2014]Lustra

    对每种属性开一个set,只要某个厂家符合该属性的最值,就加进set,最后判断是否有某个厂家在4个set里都存在即可. #include<cstdio> #include<set> ...

  10. Problem L: 输出200-299之间的所有素数

    #include<stdio.h> #include<math.h> int main() { int count,m,n,i; count=; ;m<;m++) { n ...