問題1:org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception:
hibernate.sourceforge.net
解決方法:從工程中除去外部庫中的hibernate3.jar。
問題2:無法在eclipse中啓動tomcat調試,而且打開eclipse就會報錯而且每打開xml文件也會報錯。
解決方法:開發中更改了jdk的版本可能就會出現如上錯誤,解決方法就是改回去唄。
問題3:java.io.FileNotFoundException: class path resource [com/gd/po/User.hbm.xml] cannot be
opened because it does not exist
解決方法:將src目錄下的所有hbm.xml複製到classes目錄下的相應位置。
問題4:org.dom4j.DocumentException: hibernate.sourceforge.net
解決方法:當項目中引用了hibernate3.jar之後就會報此錯誤,但移出hibernate3.jar後就無法使用
hibernate的sessionFactory和hibernateTemplate了。
問題5:Ant構建時報錯com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
解決方法:java環境變量沒設置好,沒找到javac。
問題6:java.lang.NoClassDefFoundError: antlr/ANTLRException
解決方法:將antlr-2.7.6.jar加入工程。