下面是我得到的例外的详细信息:
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。我正在使用MySQL XAMPP作为后端。你能帮忙吗? 解决这个? &#39; HR&#39;是我正在使用的数据库名称。用户名是 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>
答案 0 :(得分:1)
您的var range = document.createRange();
var selection = window.getSelection();
range.selectNodeContents(document.getElementById('p'));
selection.removeAllRanges();
selection.addRange(range);
文件中存在拼写错误:标记名称hibernate.cfg.xml
与属性名称property
之间缺少空格。改变这一行:
name
到此:
<propertyname="connection.url">jdbc:mysql://localhost:3306/hr</property>