2 jrxx1102 jrxx1102 于 2015.06.11 15:49 提问

Spring配置文件的错误,求大神解答

Spring的配置文件applicationContext.xml文件出错,错误如下:Open quote is expected for attribute "language" associated with an element type "script".
请问是什么错误?求大神解答!急!!!

3个回答

bulusli3
bulusli3   Ds   Rxr 2015.06.11 15:53

应该是少引号造成的。找找有没有类似这样的标记没加双引号

beacon_2011
beacon_2011   Rxr 2015.06.11 17:27

tomcat服务器启动的时候报的错误

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'faqFormService' defined in file [D:\soft\tomcat5.5-rcmt\webapps\rcmt\WEB-INF\classes\META-INF\spring\rcmt-message-srvc.xml]: Cannot create inner bean 'uhr.rcmt.message.srvc.FAQFormService#1aedbde' of type [uhr.rcmt.message.srvc.FAQFormService] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uhr.rcmt.message.srvc.FAQFormService#1aedbde' defined in file [D:\soft\tomcat5.5-rcmt\webapps\rcmt\WEB-INF\classes\META-INF\spring\rcmt-message-srvc.xml]: Cannot resolve reference to bean 'faqDao' while setting bean property 'faqDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'faqDao' defined in file [D:\soft\tomcat5.5-rcmt\webapps\rcmt\WEB-INF\classes\META-INF\spring\rcmt-message-dao.xml]: Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in file [D:\soft\tomcat5.5-rcmt\webapps\rcmt\WEB-INF\classes\META-INF\spring\common-sqlMap.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: org.xml.sax.SAXParseException: Open quote is expected for attribute "property" associated with an element type "result".

一大堆,但是真正有用就是最后一句,因为是最后一句引发前面的一系列问题!

Open quote is expected for attribute "property" associated with an element type "result".

查了很久,sqlMapConfig、sping xml等配置文件,最终在ibatis的数据库配置文件上找到问题了

错误写法:

正确写法

我在property中少了双引号!

u013947607
u013947607   2015.06.11 22:01
Csdn user default icon
上传中...
上传图片
插入图片