【问题标题】:Issue during the spring upgrade from 1.2 version to 4.1.1春季从 1.2 版本升级到 4.1.1 期间的问题
【发布时间】: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


【解决方案1】:

根据 Denium 的建议,我将上下文 xml DTD 替换为无版本 XSD 谢谢 Deinum

【讨论】:

    猜你喜欢
    • 2012-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-03
    • 2017-12-08
    • 1970-01-01
    • 2017-09-25
    • 2018-10-17
    相关资源
    最近更新 更多