title: How to fix this error : Cannot establish database connection with selected Hibernate configuration file.Please verify databse..........rnate.cfg.xml
body: <p>I tried to create a Hibernate project but I have a follow problem:</p>
  
  <p>
  
  
    </p>
  
  <pre><code>&lt;property name="hibernate.connection.driver_class"&gt;net.sourceforge.jtds.jdbc.Driver&lt;/property&gt;
  &lt;property name="hibernate.connection.url"&gt;jdbc:jtds:sqlserver://localhost:1433/DemoHibernate&lt;/property&gt;
  &lt;property name="hibernate.connection.username"&gt;sa&lt;/property&gt;
  &lt;property name="hibernate.connection.password"&gt;root&lt;/property&gt;
  &lt;property name="hibernate.show_sql"&gt;true&lt;/property&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>This is my hibernate.cfg.xml.In that,I use the jtds library:
          DemoHibernate: my databse in sql server 2005
          sa: my username in sql server 2005
          root: my password
  when I right-click ->New->Other->Hibernate-> Hibernate Reverse Engineering Wizard .Follow error appear:</p>
  
  <p>" <strong><em>Cannot establish database connection with selected Hibernate configuration file.Please verify databse connection details in hibernate.cfg.xml</em></strong> "</p>
  
  <p>I thinked the cause from jtds library because If I use content of hibernate.cfg.xml as follow:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt;
  &lt;hibernate-configuration&gt;
    &lt;session-factory&gt;
      &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.DerbyDialect&lt;/property&gt;
      &lt;property name="hibernate.connection.driver_class"&gt;org.apache.derby.jdbc.ClientDriver&lt;/property&gt;
      &lt;property name="hibernate.connection.url"&gt;jdbc:derby://localhost:1527/sample&lt;/property&gt;
      &lt;property name="hibernate.connection.username"&gt;app&lt;/property&gt;
      &lt;property name="hibernate.connection.password"&gt;app&lt;/property&gt;
    &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>=> All is well</p>
  
  <p>Who can help me,please?</p>