错误如下:
Caused by: com.dawning.gridview.common.gvshare.commonresource.base.export.exception.GridviewDaoException: [ERROR CODE]:0145
Query from database failed,Because锛.n the Class org.springframework.orm.hibernate3.SessionFactoryUtils's convertHibernateAccessException method's 657 lineNumber has happend org.springframework.orm.hibernate3.HibernateQueryException Exception
... 51 more
Caused by: org.springframework.orm.hibernate3.HibernateQueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.dawning.gridview.core.secidentify.po.pomanagement.export.po.Menu a where 1=1 and a.bundleSymbolicName=? ]; nested exception is org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.dawning.gridview.core.secidentify.po.pomanagement.export.po.Menu a where 1=1 and a.bundleSymbolicName=? ]
查了资料,修改hibernate的配置属性值:
加上一个属性hibernate.query.factory_class,值为org.hibernate.hql.classic.ClassicQueryTranslatorFactory。
请参考资料:
http://www.blogjava.net/SkyWinder/articles/40306.html
以下为转载
=================================================================
郁闷了一天的问题,终于在夜幕降临前得到解决,开心~~
拥有Hibernate3.jar的应用,被部署到weblogic8.1上后,抛出异常 CharScanner; panic: 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不能找到,导致异常。
被这个问题缠绕了一整天,使我的OA项目毫无进展,终于解决了~~