The solutions to the problem:ClassNotFoundException: org.hibernate.hql.ast.HqlToken

When I run the example provided by the Hibernate 3.1.3 package, “ant eg”, I got the error: “ClassNotFoundException: org.hibernate.hql.ast.HqlToken.The solutions have two which I tried and succeeded.1: place the antlr-2.7.6rc1.jar into the jdk.xxx/jre/lib/ext directory of jdk package.2: set the “hibernate.query.factory_class” to “org.hibernate.hql.classic.ClassicQueryTranslatorFactory” in the “hibernate.properties” file.3: Or add the following sentence into the hibernate.cfg.xml file: [...]

To run Hibernate example, We must put log4jXXX.jar into the "ext" directory of JDK

To run Hibernate example successfully, We must place log4jXXX.jar into the “jre/ext” directory of JDK (like: JDK1.5.0_06). for example, we can run the example provided by Hibernate package: “ant eg”.otherwise, it will have an error: java.lang.ExceptionInInitializerError at……….Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor …..