0
是異常的細節我:我得到異常「無法解析配置」下面
Exception in thread "main" org.hibernate.HibernateException: Could not
parse configuration:<br>
<br> hibernate.cfg.xml<br><br>
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1491)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1425)
at com.javatpoint.mypackage.StoreData.main(StoreData.java:14)<br>
Caused by: org.dom4j.DocumentException:Read timed out Nested exception:
Read timed out<br> <br>
at org.dom4j.io.SAXReader.read(SAXReader.java:484)<br>
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1481)
<br>
... 2 more
這是hibernate.hbm.xml我已經編碼。我通過 XAMPP作爲後端使用MySQL。能否請你幫忙解決這個問題 ? 'hr'是我正在使用的數據庫名稱。用戶名爲 root.password保留爲空。
<!-- Generated by MyEclipse Hibernate Tools. -->
<hibernate-configuration>
<session-factory>
<property name="hbm2ddl.auto">update</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<propertyname="connection.url">jdbc:mysql://localhost:3306/hr</property>
<property name="connection.username">root</property>
<property name="connection.password"></property>
<property
name="connection.driver_class">com.mysql.jdbc.Driver</property>
<mapping resource="employee.hbm.xml"/>
</session-factory>
</hibernate-configuration>
我加入DTD ......仍然得到了同樣的錯誤 –