我使用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