当前位置: 代码迷 >> Web前端 >> hibernate3 支配weblogic10.3报错
  详细解决方案

hibernate3 支配weblogic10.3报错

热度:326   发布时间:2012-06-27 14:20:09.0
hibernate3 部署weblogic10.3报错
Hibernate3.jar 的应用,被部署到weblogic10.3上后,抛出异常 org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from hbm.pojo.Area where code=:code]  

 解决方法:

 1、在hibernate.cfg.xml上,加上一个属性hibernate.query.factory_class,值为 org.hibernate.hql.classic.ClassicQueryTranslatorFactory,

具体代码如下:

<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>

 2、问题原因:weblogic.jar中已经有了一个antlr.jar的版本,导致应用中hibernate3.jar中用到的antlr.jar不能找到,导致该异常发生
  相关解决方案