严重: Exception starting filter [struts2] Class: com.opensymphony.xwork2.spring.SpringObjectFactory Fi
来源:互联网 发布:win10怎么安装java 编辑:程序博客网 时间:2024/06/06 02:15
错误信息
严重: Exception starting filter [struts2]Class: com.opensymphony.xwork2.spring.SpringObjectFactoryFile: SpringObjectFactory.javaMethod: getClassInstanceLine: 245 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:245:-1 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:493) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4590) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5233) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) 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.NullPointerException at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:245) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType(XmlConfigurationProvider.java:608) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes(XmlConfigurationProvider.java:578) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:534) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:295) at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:264) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479) ... 14 more
错误原因
在启动时,缺少Spring配置文件
解决方法
在web.xml文件中,添加ContextLoardListener监听器
<context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
阅读全文
0 0
- 严重: Exception starting filter [struts2] Class: com.opensymphony.xwork2.spring.SpringObjectFactory Fi
- Exception starting filter struts2 Line: 209 -com/opensymphony/xwork2/spring/SpringObjectFactory.java:209:-1
- tomcat6启动出现的错误 Exception starting filter struts com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance
- struts2启动报错 Class: com.opensymphony.xwork2.spring.SpringObjectFactory File: SpringObjectFactory.java
- Exception starting filter struts2 java.lang.RuntimeException: com.opensymphony.xwork2.inject.Depende
- com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance
- at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance...
- com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance
- struts2启动报错com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
- struts2启动报错com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
- struts2启动报错com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
- 严重: Exception starting filter struts2 java.lang.reflect.InvocationTargetException - Class: com.opens
- 严重: Exception starting filter struts2 java.lang.reflect.InvocationTargetException - Class: com.opens
- Line: 220 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
- Line: 220 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
- Line: 220 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
- Line: 220 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
- Line: 220 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1
- java基础学习——遇到的不懂问题
- 用eclipse运行 结果为什么没有菜单和菜单栏
- v8js中js 函数与 php 函数传值
- 前程无忧python工作薪资爬取及数据分析
- 安卓开发中非常炫的效果集合
- 严重: Exception starting filter [struts2] Class: com.opensymphony.xwork2.spring.SpringObjectFactory Fi
- 谱聚类(spectral clustering)原理总结
- 编译原理_词法分析程序设计
- Spring开启自动扫描
- 线段树的区间更新区间合并
- 初学者如何从零开始学习人工智能?看完你就懂了
- 计算机网络编程知识总结
- python:字符串操作
- 贪婪算法及其应用