使用hiberante查询数据库,hibernate有spring-config.xml配置,出现问题:
信息:SQLErrorCodes loaded: [DB2, HSQL, MS-SQL, MySQL, Oracle, Informix, PostgreSQL,Sybase]
05/06/08 16:30:35 CharScanner;panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
05/06/08 16:30:35 Shutting downOC4J...
原因:没有在hibernate配置文件设定sql查询翻译器
在spring-config配置中的hibernate项)
hibernate2.x: <propkey="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop>
我用的是hibernate3.0,用上面那个 都可以 解决 了
hibernate3: <propkey="hibernate.query.factory_class">org.hibernate.hql.ast.ASTQueryTranslatorFactory</prop>