org.hibernate.HibernateException: could not parse configuration: hibernate.cfg.xml
bitte helfen Sie mir bei der Lösung dieses Fehlers.
org.hibernate.HibernateException: Could not parse configuration: hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1494)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1428)
at org.jbpm.db.hibernate.HibernateHelper.createConfiguration (HibernateHelper.java:89)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getConfiguration (DbPersistenceServiceFactory.java:75)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:104)
at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:93)
at org.jbpm.persistence.jta.JtaDbPersistenceService.getTransactionManager(JtaDbPersistenceService.java:100)
at org.jbpm.persistence.jta.JtaDbPersistenceService.getTransactionStatus(JtaDbPersistenceService.java:88)
at org.jbpm.persistence.jta.JtaDbPersistenceService.<init>(JtaDbPersistenceService.java:50)
at org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory.openService(JtaDbPersistenceServiceFactory.java:61)
at org.jbpm.svc.Services.getService(Services.java:160)
at org.jbpm.svc.Services.getPersistenceService(Services.java:197)
at org.jbpm.JbpmContext.getPersistenceService(JbpmContext.java:695)
at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:639)
at org.jbpm.job.executor.LockMonitorThread.unlockOverdueJobs(LockMonitorThread.java:64)
at org.jbpm.job.executor.LockMonitorThread.run(LockMonitorThread.java:43)
Caused by: org.dom4j.DocumentException: Connection reset Nested exception: Connection reset
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1484)
... 15 more
Ich bin neu in hibernate und Schwierigkeiten im Verständnis, was der Fehler ist. Die jar-Dateien für Ruhezustand sind als
hibernate-annotations.jar
hibernate-jpa-2.0-api-1.0.1.Final.jar
hibernate3.jar
meine hibernate.cfg.xml
Datei ist als
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration SYSTEM
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:3306/datacenter</property>
<property name="connection.username">root</property>
<property name="connection.password">admin</property>
<!-- <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
-->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="current_session_context_class">thread</property>
<property name="show_MySql">TRUE</property>
<property name="format_sql">TRUE</property>
<!-- <property name="jboss.as.jpa.providerModule">hibernate3- bundled</property> -->
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="hibernate.cache.use_second_level_cache">true</property>
<!-- <property name="hibernate.query.factory_class">org.hibernate.hql.internal.classic.ClassicQueryTransla torFactory</property> -->
<!-- List of annotated classes-->
<!-- Associations -->
<!-- One to one -->
<!-- <mapping class="Emp_Timecard" />
<mapping class="maindoor" /> -->
<mapping class="model.serverroom" />
<mapping class="model.resourcelist" />
<mapping class="model.timesheet" />
<mapping class="model.maindoor" />
<!-- <mapping class="timesheet" />
<mapping class="Resource_list"/> -->
</session-factory>
</hibernate-configuration>
InformationsquelleAutor user2559489 | 2013-07-08
Du musst angemeldet sein, um einen Kommentar abzugeben.
Ich denke, Sie haben ein Problem mit der Verbindung zur db richtig. Sind Sie sicher, dass der Benutzername und das Passwort korrekt sind? Oder haben Sie eine bereits eine Datenbank namens datacenter?
Auch versuchen, ändern Sie den doctype als
InformationsquelleAutor Sanjaya Liyanage
Sehen Kann nicht analysieren hibernate.cfg.xml während Sie offline sind
Je nach hibernate-version könnte es sein, dass hibernate versucht, laden Sie die DTD aus dem internet und die Verbindung wird zurückgesetzt, in der Zwischenzeit.
InformationsquelleAutor Buurman
laufen hibernate-Anwendung offline verwenden 'hibernate-core-jar-Datei, es wird funktionieren..
keine Notwendigkeit, ändern Sie Ihre Hibernate-Konfigurationsdatei .Avvappa,BEL.
InformationsquelleAutor Avvappa B Hegadyala
ändern ur hiber Konfiguration, die ich.e
----------------------------als unten -------------------------------------
InformationsquelleAutor samtr
ändern Sie Ihre Hibernate-Konfiguration wie folgt;
InformationsquelleAutor samtr
Versuchen Sie das Programm Ausführen, während Ihr system mit dem Internet verbunden ist
War ich vor dem gleichen Problem. Und wenn ich suchte für die Lösung online gefunden diesen thread über das gleiche Thema.
Ging ich zurück und versuchte, das Programm läuft wieder und es hat funktioniert, die einzigen änderungen, die gemacht wurden mit Internet-Anschluss. Ich schaltete die Verbindung aus, und wieder das Programm gab die gleiche Fehlermeldung wie du bekam.
Meine Vermutung ist, dass die Hibernate-Konfigurationsdatei herunterladen der DTD aus dem internet, und wenn es nicht tut, so gibt es Fehler beim erzeugen der SessionFactory-Objekt.
InformationsquelleAutor sky
Wenn die Konfigurations-Datei wird nicht geparst, nur überprüfen Sie für den hibernate-version. Wenn es hibernate 3 die DTD sollte aus Sourceforge website. wenn es ist die spätere version der DTD werden sollte
InformationsquelleAutor Sheeba Nancy