title: Hibernate Reverse Engineering with Eclipse and MySql
body: <p>I'm having the hardest time getting Eclipse to connect and reverse engineer from a MySQL5 database. I can see Eclipse connecting to my MySQL database and can even see the tables through the "Data Source Explorer" view but when I try it after creating Hibernate Console and Configuration files, I get the error: </p>
  
  <pre><code>org.hibernate.console.HibernateConsoleRuntimeException:
  Problems while loading database
      driverclass (com.mysql.jdbc.Driver)
  Problems while loading database
      driverclass (com.mysql.jdbc.Driver)  
  java.lang.ClassNotFoundException:com.mysql.jdbc.Driver
  java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
  </code></pre>
  
  <p>From my simple java project, I start by creating a Hibernate Configuration File (cfg.xml). </p>
  
  <pre><code>Name of file: hibernate.cfg.xml
  Session Factory name: org.hibernate.SessionFactory
  Database Dialect: org.hibernate.dialect.MySQL5Dialect      
  Driver Class: com.mysql.jdbc.Driver      
  Connection Url: jdbc:mysql://localhost:3306/&lt;myDatabaseName&gt;    
  Default Schema: &lt;myDatabaseName&gt;        
  Username: correct username  
  Password: correct password
  </code></pre>
  
  <p>I also have selected the option to "Create a console Configuration"</p>
  
  <p>At this point, I can see the new configuration listed in my "Hibernate Configuration" perspective/workbench pane. If I try to expand it, I get the earlier listed error.</p>
  
  <p>I don't understand why I can see the database through the 'Data Source Explorer" and even though I'm using the DB connection profile listed in there as part of my configuration, I still get this error.</p>
  
  <p>I also tried to create a new database profile using a manual mysql connector jar (mysql-connector-java-5.1.13-bin.jar) and same end result.</p>
  
  <p>Versions of what I have:</p>
  
  <pre><code>Eclipse version: 3.6.0 aka Helios, Build 20100617 - 1415
  MySQL: 5.1.34
  Hibernate Tools (from JBoss): HibernateTools-3.3.1.v201006011046R-H111-GA 
  (placed into Eclipse's 'dropins' folder)
  </code></pre>
  
  <p>What am I doing wrong in my hibernate configuration setup? </p>
  
  <p>Help!</p>