-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem with hibernate.cfg.xml
PostPosted: Tue Sep 06, 2011 10:20 am 
Newbie

Joined: Tue Sep 06, 2011 10:15 am
Posts: 1
Hey huys,u doing good?
Take a look at my problem,thats my XML file:

Code:
<?xml version="1.0" encoding="UTF-8"?> 
    <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> 

<!--
    Document   : hibernate.cfg.xml
    Created on : 1 de Setembro de 2011, 12:13
    Author     : Alencar
    Description:
        Purpose of the document follows.
-->

<hibernate-configuration>
   <session-factory>
      <property name="hibernate.connection.username">root</property>
      <property name="hibernate.connection.password"></property>
      <property name="hibernate.connection.url">jdbc:mysql://localhost/paulobaterias</property>
      <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
      <property name="hibernate.connection.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
      <property name="hibernate.hbm22ddl.auto">update</property>
      <property name="show_sql">true</property>
      <property name="format_sql">true</property>
                <mapping class="Modelos.EstoqueSucata" />
   </session-factory>
</hibernate-configuration>


when im trying to insert a test object to the database,i get the following error:

Quote:
run:
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version).
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:1500)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:990)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:69)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1434)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:972)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:69)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1420)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:966)
at Principal.Main.main(Main.java:27)
Caused by: org.dom4j.DocumentException: Error on line 1 of document : The processing instruction target matching "[xX][mM][lL]" is not allowed. Nested exception: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1490)
... 8 more


can somebody help me?thank you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.