【正文】
long),因為這種類型會自動分配值, 而這個值往往會讓系統(tǒng)認為已經(jīng)存在該記錄, .4. 如果插入數(shù)據(jù)時出現(xiàn) argument type mismatch 錯誤, 可能是你使用了Date等特殊對象, 因為struts不能自動從String型轉(zhuǎn)換成Date型,所以, 你需要在Action中手動把String型轉(zhuǎn)換成Date型.5. Hibernate中, Query的iterator()比list()方法快很多.6. 如果出現(xiàn) equal symbol expected 錯誤, 說明你的strtus標簽中包含另一個標簽或者變量, 例如:html:select property=test /或者html:hidden property=test value=bean:write name=t property=p//這樣的情況... 錯誤:Exception in thread main : Could not execute JDBC batch update原因與解決: 因為Hibernate Tools(或者Eclipse本身的Database Explorer)生成*.=***(*表示數(shù)據(jù)庫名稱)這樣的屬性,將該屬性刪除就可以了錯誤:: deleted object would be resaved by cascade (remove deleted object from associations)原因與解決:方法1 刪除Set方的cascade方法2 解決關聯(lián)關系后,再刪除方法3 在manytoone方增加cascade 但值不能是none最后一招:檢查一下hashCode equals是否使用了id作為唯一標示的選項了;;但是用了native,就不行了,怎么辦?刪除啊!問題:今天用Tomcat ,發(fā)現(xiàn)原來很好用的系統(tǒng)不能用了,反復測試發(fā)現(xiàn)頁面中不能包含 taglib,否則會出現(xiàn)以下提示:HTTP Status 500 type Exception reportMessagedescription The server encountered an internal error () that prevented it from fulfilling this request.exception: /(1,1) Unable to read TLD METAINF/tlds/ from JAR filefile:*****/WEBINF/lib/:原因:更新了工程用的lib文件夾下的jar。解決:。錯誤: 原因: 發(fā)現(xiàn) dao 實例、 manage 實例等需要注入的東西沒有被注入(俗稱空指針異常)解決:這個時候,你應該查看日志文件;默認是應用服務器的 log 文件,比如 Tomcat 就是 [Tomcat 安裝目錄 ]/logs ;你會發(fā)現(xiàn)提示你:可能是:: Error creating bean with name 39。39。sf39。39。 defined in ServletContextresource [/WEBINF/]: Initialization of bean failed。 nested exception is: could not configure from URL: file:src/: could not configure from URL: file:src/……………………….Caused by: : srcamp。92??赡苁牵? Error creating bean with name 39。39。sessionFactory39。39。 defined inServletContext resource [/WEBINF/]: Initialization of bean failed。 nested exception is: Resource: /mcc/coupon/model/ not found: Resource: /mcc/coupon/model/ not found然后你就知道原因是因為配置文件的解析出了錯誤,這個通過 Web 頁面是看不出來的。更多的是持久化影射文件出的錯誤;導致了沒有被解析;當然你需要的功能就無法使用了。錯誤:StandardWrapperValve[action]: () for servlet action threw exception: Cannot retrieve mapping for action /settlementTypeManage或者: type Status report message Servlet action is not available description The requested resource (Servlet action is not available) is not available.原因: 同 上錯誤StandardWrapperValve[jsp]: () for servlet jsp threw exception: 界面錯誤具體描述:: Failed to load or instantiate TagExtraInfo class: 原因與解決: 方案一你的“html:”開頭的標簽沒有放在一個html:form中 方案二重新啟動你的應用服務器,自動就沒有這個問題了