title: hibernate first application
body: <p>I am getting error while creating simple hibernate application using oracle 10g</p>
  
  <pre><code>ERROR:- 
  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 hibernate.StoreData.main(StoreData.java:13)
  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:1481)
      ... 2 more
  </code></pre>
  
  <p>Mapping File:-</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;  
  &lt;!DOCTYPE hibernate-mapping PUBLIC  
   "-//Hibernate/Hibernate Mapping DTD 3.0//EN"  
   "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&gt;  
  
   &lt;hibernate-mapping&gt;  
    &lt;class name="hibernate.Employee" table="emp1000"&gt;  
      &lt;id name="id"&gt;  
       &lt;generator class="assigned"&gt;&lt;/generator&gt;  
      &lt;/id&gt;  
  
      &lt;property name="firstName"&gt;&lt;/property&gt;  
      &lt;property name="lastName"&gt;&lt;/property&gt;  
  
    &lt;/class&gt;  
  
   &lt;/hibernate-mapping&gt;  
  </code></pre>
  
  <p>Configuration file:- </p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;  
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;hibernate-configuration&gt;  
  
      &lt;session-factory&gt;  
          &lt;property name="hbm2ddl.auto"&gt;update&lt;/property&gt;  
          &lt;property name="dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/property&gt;  
          &lt;property name="connection.url"&gt;jdbc:oracle:thin:@localhost:1521:xe&lt;/property&gt;  
          &lt;property name="connection.username"&gt;hr&lt;/property&gt;  
          &lt;property name="connection.password"&gt;hr&lt;/property&gt;  
          &lt;property name="connection.driver_class"&gt;oracle.jdbc.driver.OracleDriver&lt;/property&gt;  
  
      &lt;mapping resource="employee.hbm.xml"/&gt;  
      &lt;/session-factory&gt;  
  
  &lt;/hibernate-configuration&gt;  
  </code></pre>