Error on line 24 of document : Open quote is expected for attribute "{1}" associated with an eleme

 Exception in thread "main" org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
 at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2246)
 at org.hibernate.cfg.Configuration.configure(Configuration.java:2158)
 at org.hibernate.cfg.Configuration.configure(Configuration.java:2137)
 at com.bjsxt.hibernate.StudentTest.main(StudentTest.java:14)
Caused by: org.dom4j.DocumentException: Error on line 24 of document  : Open quote is expected for attribute "{1}" associated with an  element type  "class". Nested exception: Open quote is expected for attribute "{1}" associated with an  element type  "class".
 at org.dom4j.io.SAXReader.read(SAXReader.java:482)
 at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2238)
 ... 3 more

 

xml解析 属性必须用引号

class属性必须用引号。。

添上  =“com.bjsxt.hibernate.Student”/>

你可能感兴趣的:(hibernate)