0
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.hibernate.HibernateException: Could not parse configuration: hibernate.cfg.xml
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:13)
Caused by: org.dom4j.DocumentException: Connection refused: connect Nested exception: Connection refused: connect
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1481)
... 2 more
爲什麼會發生這種HibernateException?運行一個簡單的Hibernate應用程序時出現HibernateException「無法解析配置:hibernate.cfg.xml」錯誤
這是一個問題的可怕標題。請將其更改爲描述您問題的內容。另外,請添加更多信息,只是stacktrace沒有太大的幫助。 – Keppil
ur'hibernate.cfg.xml'是不可解析的。 plz在問題中添加你的hibernate.cfg.xml文件內容。 – Bikku
請上傳你的配置文件... –