文档章节

Unable to load configuration. - [unknown location]

唐小唐
 唐小唐
发布于 2015/04/25 20:21
字数 339
阅读 17
收藏 0

严重: Exception starting filter struts2
Unable to load configuration. - [unknown location]
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepa
reAndExecuteFilter.java:51)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.ja
va:273)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.jav
a:254)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.
java:372)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:9
8)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4584)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5262)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5257)
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(ConfigurationMana
ger.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371
)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
... 14 more
Caused by: Cannot locate the chosen ObjectFactory implementation: spring - [unknown locati
on]
at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:293)
at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:264)
at org.apache.struts2.config.BeanSelectionProvider.register(BeanSelectionProvider.java:20
2)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfig
uration.java:180)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationMana
ger.java:66)

... 16 more



1.只有struts框架

<package name="a"  extends="struts-default">
<action name="login" class="LoginAction">
<result name="error">
/failed.jsp
</result>
</action>
</package>

2.在struts框架上整合spring且struts上测试通过,spring失败

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" 
xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
 <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>

  <display-name></display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <filter>
  <filter-name>struts2</filter-name>
  <filter-class>
  org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
  </filter-class>
  </filter>
  <filter-mapping>
  <filter-name>struts2</filter-name>
  <url-pattern>/*</url-pattern>
  </filter-mapping></web-app>

是否导入

struts2-spring-plugin-2.2.3.1.jar

有些需要

?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<constant name="struts.objectFactory" value="spring" />
<package name="a"  extends="struts-default">
<action name="login" class="LoginAction">
<result name="error">
/failed.jsp
</result>
</action>
</package>
</struts>    


© 著作权归作者所有

唐小唐
粉丝 2
博文 24
码字总数 20125
作品 0
荆州
程序员
私信 提问
用tomcat启动时报错,好像跟mycat有关,谁能帮忙解决下?

2017-10-26 11:19:55,246 ERROR - Dispatcher initialization failed Unable to load configuration. - [unknown location] at com.opensymphony.xwork2.config.ConfigurationManager.getCon......

Boss-x
2017/10/26
138
2
SSH2整合出现Unable to load configuration. - [unknown location]错误

这别人机器上可以 一到我机器上就出现下面错误 ,求高手解答 Unable to load configuration. - [unknown location] at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:431)......

Atomool
2012/05/07
5.1K
3
tomcat启动异常

严重: Dispatcher initialization failed Unable to load configuration. - [unknown location] at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationMa......

妞妞超人
2013/03/12
3.3K
7
ssh项目运行不了,报错

书上一个ssh项目,运行不了,报错,请问一下,问题出在哪里,google表示要删除xerces.jar 但web-inf 的lib文件夹下没有xerces.jar 严重: Exception starting filter struts2 Unable to load ...

迟到的企鹅
2012/12/19
372
4
Spring整合Struts在配置Struts过程中出现错误:Unable to load configuration. - [unknown location]

1.首先是报错信息 Unable to load configuration. - [unknown location] at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70) at org.......

非沧海一粟不随波逐流
2016/12/14
892
1

没有更多内容

加载失败,请刷新页面

加载更多

JAVA 编写redisUtils工具类,防止高并发获取缓存出现并发问题

import lombok.extern.slf4j.Slf4j;import org.springframework.data.redis.core.BoundHashOperations;import org.springframework.data.redis.core.BoundValueOperations;import org.......

huangkejie
38分钟前
5
0
JMM内存模型(一)&volatile关键字的可见性

在说这个之前,我想先说一下计算机的内存模型: CPU在执行的时候,肯定要有数据,而数据在内存中放着呢,这里的内存就是计算机的物理内存,刚开始还好,但是随着技术的发展,CPU处理的速度越...

走向人生巅峰的大路
55分钟前
95
0
你对AJAX认知有多少(2)?

接着昨日内容,我们几天继续探讨ajax的相关知识点 提到ajax下面几个问题又是必须要了解的啦~~~ 8、在浏览器端如何得到服务器端响应的XML数据。 通过XMLHttpRequest对象的responseXMl属性 9、 ...

理性思考
今天
5
0
正则表达式基础(一)

1.转义 转义的作用: 当某个字符在表达式中具有特殊含义,例如字符串引号中出现了引号,为了可以使用这些字符本身,而不是使用其在表达式中的特殊含义,则需要通过转义符“\”来构建该字符转...

清自以敬
今天
4
0
idea中@Data标签getset不起作用

背景:换电脑以后在idea中有@data注解都不生效 解决办法:idea装个插件 https://blog.csdn.net/seapeak007/article/details/72911529...

栾小糖
今天
5
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部