- Java code
错误如下: Caused by: org.hibernate.QueryException: ClassNotFoundException: org.hibernate.h ql.ast.HqlToken [FROM com.mtm.nhis.system.po.User WHERE isDeleted='0' AND keyTyp e='3' And passWord = ? AND supervisorsNumber = ?] 我希望用 hibernate3的批量更新删除的操作。故在applicationContext.xml里配置了 <prop key="hibernate.query.factory_class">org.hibernate.hql.ast.ASTQueryTranslatorFactory</prop> hibernate.config.xml 里 <property name="hibernate.query.factory_class"> org.hibernate.hql.classic.ClassicQueryTranslatorFactory </property> 也将antlr-2.7.5H3.jar copy 到 C:\bea\wlserver_10.3\server\lib并且 startWeblogic.cmd 里修改如下 set PRE_CLASSPATH=C:\bea\wlserver_10.3\server\lib\antlr-2.7.5H3.jar; set DOMAIN_HOME=C:\bea\wlserver_10.3\samples\domains\wl_server set CLASSPATH=%PRE_CLASSPATH%;%CLASSPATH%
但是 还报错。。。。。。高手指教
------解决方案--------------------
<prop key="hibernate.query.factory_class">org.hibernate.hql.ast.ASTQueryTranslatorFactory</prop>
貌似你引入的类有问题,我以前处理过,记得批量更新引入的不是这个类,楼主网上查下,肯定有