Java Struts2上下文初始化失败

时间:2015-12-22 07:22:19

标签: java struts2

每个技术超人:

当我部署战争时,发现一些错误,就像这样下来,如果你遇到同样的问题,我希望你能帮助我回答,谢谢你。

  

刷新Root WebApplicationContext:启动日期[Tue Dec 22   2015年14:15:18 CST];上下文层次结构的根

     

从文件加载XML bean定义   [/usr/local/webapps/Xxxx/WEB-INF/classes/struts.xml]上下文   初始化失败   org.springframework.beans.factory.BeanDefinitionStoreException:   IOException从文件解析XML文档   [/usr/local/webapps/Xxxxenter image description here/WEB-INF/classes/struts.xml];嵌套异常是   java.net.ConnectException:连接超时

enter image description here

1 个答案:

答案 0 :(得分:0)

这是一个弹簧初始化问题而不是struts。

您已将struts.xml定义为spring bean定义xml文件。这迫使spring加载struts.xml,这当然不是一个有效的spring bean xml。

检查spring-application-context.xml。可能会因错误使用外卡而加载struts.xml,例如:<import resource="classpath:*.xml" />