本地开发环境中可以运行正常,部署到服务器抛出异常

jijiccee 发布于 2015/05/23 11:28
阅读 551
收藏 0
 

spring cvc-elt.1: Cannot find the declaration of element 'beans'

nested exception is org.springframework.beans.factory.xml.XmlBeanDefiniti

onStoreException: Line 1 in XML document from class path resource [config/spring

/datacollector/resource-dao.xml] is invalid; nested exception is org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed inschema elements other than 'xs:appinfo' and 'xs:documentation'.

本地开发环境中可以运行正常,部署到服务器抛出异常

加载中
0
xlsx
xlsx

报错可能是因为服务器不能联网,本地可以联网所以运行正常

<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xmlns="http://www.springframework.org/schema/beans" xmlns:p="http://www.springframework.org/schema/p"

    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"

    default-autowire="byName">

改为本地引用

<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xmlns="http://www.springframework.org/schema/beans" xmlns:p="http://www.springframework.org/schema/p"

    xsi:schemaLocation="http://www.springframework.org/schema/beans classpath:/org/springframework/beans/factory/xml/spring-beans-3.2.xsd"


查看jar中对应的spring-beans-3.2.xsd版本号

0
j
jijiccee

问题解决了

返回顶部
顶部