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. 学习LSM(Linux security module)之一:解读yama

    最近打算写一个基于LSM的安全模块,发现国内现有的资料极少.因此打算自己琢磨一下.大致的学习路线如下: 由易至难使用并阅读两到三个安全模块->参照阅读模块自己实现一个安全模块->在自己实现 ...

  2. 使用lookup-method解决singleton bean依赖prototype bean的问题

    在Spring里面,当一个singleton bean依赖一个prototype bean,那么,因为singleton bean是单例的,因此prototype bean在singleton bea ...

  3. [BZOJ 3170] 松鼠聚会

    Link: BZOJ 3170 传送门 Solution: $Knowledge Point:$ 切比雪夫距离$DIST(a,b)=max\{ |X'_a-X'_b|,|Y'_a-Y'_b|\}$ 曼 ...

  4. [BZOJ 1143] 祭祀river

    Link:https://www.lydsy.com/JudgeOnline/problem.php?id=1143 Solution: 一道最长反链的模板题 由Dilworth定理可知:最小链覆盖数 ...

  5. display:block什么时候使用

    所有的块级元素不需要再在使用display:block定义,块级元素本身的默认属性就是block display:block:比较常用于<a><span>这两个标签,因为他们不 ...

  6. angularjs+requirejs整合

    通过requirejs的配置让angularJS可以正常运行.以下是配置的步骤: 环境需求 require.js angular.js 有了这两文件,就可以进行下一步了,具体将文件放到哪个目录,可以跟 ...

  7. Chrome插件在页面上直接绑定JavaScript事件提示Refused to execute inline event handler because it violates the following Co

    Chrome插件问了安全是不提倡在页面上直接写JavaScript的,如果出现了这个提示,其实也没有什么,同样可以运行. 从Chrome Extenstion V2开始,不允许执行任何inline j ...

  8. Swift,结构体与类

    1.结构体(小的类就是用struct来写) struct arrow{ var x=0,y=0 } 2.类(常用) class a{ var a=10 var b=20 } var b=a() //实 ...

  9. [Android Memory] 怎样使一个Android应用不被杀死

    转载自: http://blog.sina.com.cn/s/blog_3e3fcadd0100yjo2.html 参考:http://blog.csdn.net/windskier/article/ ...

  10. EL表达式介绍(1)

    1. 产生背景: 在MVC体系结构中,JSP页面只是用来显示数据,但JSP脚本中的表达式功能不够强大,它不能直接对隐式对象中某对象的属性进行显示,需要配合 scriptlet才能显示数据,很是麻烦,如 ...