【发布时间】:2015-03-19 20:50:08
【问题描述】:
以下是我在服务器启动过程中遇到的问题。
org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml];嵌套异常是 java.net.ConnectException:尝试了所有:'2' 地址,但无法通过 HTTP 连接到服务器:'www.springframework.org',端口:'80'
我认为问题可能出在 xsd 上。我已经进行了相应的更改,但仍然无法解决。谁能帮我解决问题
这是我的应用程序上下文 xml 文件
**
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="cdqiPerformanceMonitor"
class="com.tms.cdqi.framework.aop.interceptor.CDQIPerformanceMonitorInterceptor" />
<bean id="cdqiApplicationContextFactory"class="com.tms.cdqi.framework.context.CDQIAppl icationContextFactoryImpl" />
<bean id="commandInvoker"class="org.springframework.ejb.access.LocalStatelessSessionPr oxyFactoryBean"
lazy-init="true">
<property name="jndiName">
<value>ejb/CommandInvokerLocal</value>
</property>
<property name="businessInterface">
<value>
com.tms.cdqi.application.command.invoker.CommandInvoker
</value>
</property>
</bean>
</beans>**
【问题讨论】:
-
您的
applicationContext.xml文件是什么样的?看起来那里对“www.springframework.org”的引用不再有效。 -
@Jesper 我的应用程序上下文 xml 包含 doctype 而不是 XSD。这是我的 xml 中的以下内容。ttp://www.springframework.org/dtd/spring-beans.dtd" rel="nofollow" target="_blank">springframework.org/dtd/spring-beans.dtd">
-
请不要将代码添加为评论,而是对您的原始问题进行编辑。要解决您的问题,请不要使用 dtd,而是使用 xsd 命名空间。
-
@Deinum 当然我会听从你的建议。我在其他帖子中看到了您提供的解决方案。我尝试了您使用 xsdversions 提供的解决方案,但仍然存在同样的问题。是否必须提供 xsd 版本?
-
不建议使用版本较少的。请发布您的 xml 文件,或者至少是标题。 (请编辑您的问题)。
标签: java xml spring spring-mvc