Posted on July 3rd, 2006 by HuHe
When you want to associate a database table with Hibernate, you must remember to add resource mapping, something like:< resource=”myPack/Category.hbm.xml”>, into the hibernate.cfg.xml file. Otherwise, the data from this table can’t be found.
No Comments »
Filed under: Java
Posted on June 6th, 2006 by HuHe
if in the xx.hbm.xml file, you made a mistake,like: you write a wrong property name which doesn’t exist in the mapping class. say: “username” is a property in the class “User.class”,but you write it as “usename”. Then the problem happens, “Servlet action is not available” will display on your page.
No Comments »
Filed under: Java
Posted on May 27th, 2006 by HuHe
Hibernate has version 2 and version 3. There are some differences between them, so We must pay attention to these differencs when we are programming.
No Comments »
Filed under: Java
Posted on April 25th, 2006 by HuHe
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:
org.hibernate.hql.classic.ClassicQueryTranslatorFactory
2 Comments »
Filed under: Java
Posted on April 24th, 2006 by HuHe
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 …..
No Comments »
Filed under: Java