【轉】spring報錯 sql-error-codes.xml


 程序在本地機跑的好好的,一放到服務器就報錯!!

[org.springframework.beans.factory.xml.XmlBeanDefinitionReader]-Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
2008-11-06 14:29:01 [org.springframework.jdbc.support.SQLErrorCodesFactory]-SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]

 

可是呢,服務啟動的時候一切正常,而且顯示是成功啟動的!是在運行中報錯!於是檢查各個方法,一直在查,覺得是spring的配置有問題,可是。。。。在本地機上跑tomcat為什么就沒問題呢。。。。。

又懷疑是websphere的問題,then。。。網上再查查~

 

2008-11-06 14:29:01 [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]-[INFO] Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
2008-11-06 14:29:01 [org.springframework.jdbc.support.SQLErrorCodesFactory]-[INFO] SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
什么都好使,也沒有什么錯誤,就是無法插入到數據庫
沒有錯誤是因為你Try Catch了..。去掉后是java.sql.SQLException missing comma(逗號)錯誤.。是因為sql語句中多了一個單詞

 

原來~~~~~~~~~去掉try。。。catch后,原來是配置文件中配置的域名服務器解析不了。。。

也就是說,這個錯誤和spring一點關系都沒有!!

 

害我弄了1上午~呵呵~

 

還有一篇文章不錯:http://hi.baidu.com/nuller/blog/item/715d770e8ec60dcd7bcbe1d9.html

以后要再耐心些啊~呵呵


轉自http://blog.csdn.net/maggiehexu/article/details/4527823   THX


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM