现象1:
严重: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Line 2 in XML document from ServletContext resource [/WEB-INF/dataAccessContext-hibernate.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'
原因:
因为缺少:dataAccessContext-hibernate.xml开头要
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
==============================================================================
现象2:
当dataAccessContext-hibernate.xml 里输入了某些日文字符的时候,或者是日文空格,会出现一个错误,
Nitrox插件并不会显示这个字符,以及错误的所在位置。只会在Problem栏提示“1 byte err invalie ...”,这时
需要切换到“text editor”编辑模式来看这个配置文件,就可以看到类似“!!!!”的不可见字符了。删除后OK。