Terry.Li-彬

          虛其心,可解天下之問;專其心,可治天下之學;靜其心,可悟天下之理;恒其心,可成天下之業(yè)。

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            143 隨筆 :: 344 文章 :: 130 評論 :: 0 Trackbacks
          在weblogic下使用hibernate+spring需要在hibernate-context.xml中定義下面屬性,
          <prop key="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop>
          否則會出現(xiàn)以下異常:
          Exception in thread "Timer-5" org.springframework.orm.hibernate3.HibernateQueryE
          xception: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.futur
          esoftware.oa.workflow.engine.ActivityInstance t where t.timeoutTime<to_date('200
          7-9-27 18:03:29','yyyy-MM-dd hh24:mi:ss') and t.status!=4 and t.isTimeout=0]; ne
          sted exception is org.hibernate.QueryException: ClassNotFoundException: org.hibe
          rnate.hql.ast.HqlToken [from com.futuresoftware.oa.workflow.engine.ActivityInsta
          nce t where t.timeoutTime<to_date('2007-9-27 18:03:29','yyyy-MM-dd hh24:mi:ss')
          and t.status!=4 and t.isTimeout=0]
          Caused by: org.hibernate.QueryException: ClassNotFoundException: org.hibernate.h
          ql.ast.HqlToken [from com.futuresoftware.oa.workflow.engine.ActivityInstance t w
          here t.timeoutTime<to_date('2007-9-27 18:03:29','yyyy-MM-dd hh24:mi:ss') and t.s
          tatus!=4 and t.isTimeout=0]
                  at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57)
                  at antlr.CharScanner.setTokenObjectClass(CharScanner.java:340)
                  at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31)
                  at antlr.CharScanner.<init>(CharScanner.java:51)
                  at antlr.CharScanner.<init>(CharScanner.java:60)
                  at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:56)
                  at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:53)
                  at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:50)
                  at org.hibernate.hql.ast.HqlLexer.<init>(HqlLexer.java:26)
                  at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44)
                  at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.j
          posted on 2007-09-27 18:07 禮物 閱讀(4671) 評論(8)  編輯  收藏

          評論

          # re: ClassNotFoundException: org.hibernate.hql.ast.HqlToken 2007-11-07 19:13 禮物
          自己頂以下
            回復  更多評論
            

          # re: ClassNotFoundException: org.hibernate.hql.ast.HqlToken 2008-07-04 12:08 zephyr
          謝謝,幫我了很大忙  回復  更多評論
            

          # re: ClassNotFoundException: org.hibernate.hql.ast.HqlToken 2009-04-22 16:06 fs
          非常感謝  回復  更多評論
            

          # re: ClassNotFoundException: org.hibernate.hql.ast.HqlToken 2009-04-23 09:36 禮物
          不客氣,這個問題當年也讓我找了好久。  回復  更多評論
            

          # re: ClassNotFoundException: org.hibernate.hql.ast.HqlToken 2009-09-17 12:01 示范點
          兩位老大你兩演雙黃那,到底怎么解決的呀  回復  更多評論
            

          # re: ClassNotFoundException: org.hibernate.hql.ast.HqlToken[未登錄] 2009-09-27 09:01 禮物
          寫的很清楚呀,再hibernate-context.xml中加入<prop key="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop>
          就可以了  回復  更多評論
            

          # re: ClassNotFoundException: org.hibernate.hql.ast.HqlToken 2009-11-21 16:30
          @禮物
          這樣刪除報錯!!!!!!!  回復  更多評論
            

          # re: ClassNotFoundException: org.hibernate.hql.ast.HqlToken 2011-06-09 09:10 ss
          那如果你Spring3+hibernate3+weblogic里有一句updete的更新語句就可以了  回復  更多評論
            


          只有注冊用戶登錄后才能發(fā)表評論。

          網(wǎng)站導航:
           
          主站蜘蛛池模板: 元江| 牙克石市| 滁州市| 滕州市| 五寨县| 阿拉善左旗| 邳州市| 苍山县| 梁河县| 新源县| 藁城市| 东乌珠穆沁旗| 黄梅县| 民权县| 陆川县| 玉溪市| 桂平市| 新密市| 天门市| 沁水县| 木兰县| 涞水县| 桂林市| 封丘县| 鞍山市| 新和县| 城口县| 武强县| 若羌县| 开阳县| 岢岚县| 安徽省| 白沙| 苏尼特左旗| 察雅县| 曲阳县| 汤原县| 海伦市| 卢湾区| 遂昌县| 白城市|