我使用hibernate 4.0和mysql 5.6與eclipse luna(v4.4.1), 我在我的項目中使用hibernate註釋。 當我對DB的任何表進行更改時,我總是通過eclipse hibernate配置自動生成hibernate註釋。 我的問題是: 當我不連接互聯網,並希望生成hibernate註釋我得到這個錯誤:[Classpath]:無法加載AnnotationConfiguration(屏幕截圖還附加),當我連接到互聯網我不面臨這個錯誤。 是這個bug或功能?如果這是功能,那麼我怎麼能離線生成休眠註釋? 謝謝! 無法加載AnnotationConfiguration休眠,當互聯網沒有連接
的hibernate.cfg.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">myroot</property>
<property name="hibernate.connection.url">jdbc:mysql://192.168.72.128:3306/hesco</property>
<property name="hibernate.connection.username">myroot</property>
</session-factory>
</hibernate-configuration>
感謝您節省我的一天,我的問題是如何以及在哪裏(位置)我可以把dtd放在我的項目中? 順便說一句192.168.72.128是我的服務器機器IP,它工作正常。 – 2014-12-05 22:14:09