Terry.Li-彬

虚其心,可解天下之问;专其心,可治天下之学;静其心,可悟天下之理;恒其心,可成天下之业。

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  143 随笔 :: 344 文章 :: 130 评论 :: 0 Trackbacks
在weblogic下使用hibernate+spring需要在hibernate-context.xml中定义下面属性,
<prop key="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop>
否则会出现以下异常:
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 礼物 阅读(4647) 评论(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的更新语句就可以了  回复  更多评论
  


只有注册用户登录后才能发表评论。

网站导航: