1. 程式人生 > >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".

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的資料庫配置檔案上找到問題了

錯誤寫法:
<result column="WOR_RESUME_TANGENT_SCALE_" property=resumeTangentScale />

正確寫法

<result column="WOR_RESUME_TANGENT_SCALE_" property="resumeTangentScale" />

我在property中少了雙引號!