ClassNotFoundException: org.hibernate.hql.ast.HqlToken

   J2EE项目中使用了Hibernate框架,其中包含了Hibernate的依赖包,当项目部署到Weblogic10.3,启动时发生错误:ClassNotFoundException: org.hibernate.hql.ast.HqlToken。

   解决方法:在hibernate.properties上,或是在spring的conext xml中,加上一个属性hibernate.query.factory_class,值为org.hibernate.hql.classic.ClassicQueryTranslatorFactory。

 

   原因:从网上获知,weblogic.jar中已经有了一个antlr.jar的版本,导致应用中hibernate3.jar中用到的antlr.jar不能找到,导致异常。

猜你喜欢

转载自honley.iteye.com/blog/1661913
今日推荐