spring異常資訊

2021-08-29 15:25:34 字數 633 閱讀 4063

今天在開發新的整合框架,在spring呼叫hibernate通過hql查詢竟然報下面的錯誤

這個錯誤因為是採用flex呼叫生成選單,所以錯誤的**頁不全

org.springframework.orm.hibernate3.hibernatequeryexception : classnotfoundexception: org.hibernate.hql.ast.hqltoken [ from org.netliving.luckybamboo.system.sysmenu  t where t.useryn='y' and t.type='top' order by t.orderid]; nested exception is org.hibernate.queryexception: classnotfoundexception: org.hibernate.hql.ast.hqltoken [ from org.netliving.luckybamboo.system.sysmenu  t where t.useryn='y' and t.type='top' order by t.orderid]

由於報的這個類在hibenate3.jar中,很是鬱悶阿。google了一下發現原來是antlr.jar沒有

在lib下放入這個jar,一切ok,可以用flex讀取選單了

Spring 異常處理

今天在做專案的時候突然發現異常處理還有所欠缺,所有打算好好的加強一下異常的處理,順便好好鞏固以前學習的知識和增加新的知識。實現spring介面 handlerexceptionresolver public class exceptionresolver implements handlerexce...

Spring事務 異常

spring事務 異常 spring的事務實現採用基於aop的 來實現,如果沒有在事務配置的時候註明回滾的checked exception,那麼只有在發生了unchecked exception的時候,才會進行事務回滾。因此在dao層和service層,最好丟擲unckecked exceptio...

spring異常處理

spring提供了多種方式將異常轉化為響應 1.內建的將以異常轉換為http碼就不說了,由spring自身丟擲,然後產生對應的http狀態碼響應。2.下例子用 responsestatus註解將myexception異常對映為http狀態碼404。沒有找到 public class myexcept...