title: [PersistenceUnit: <name>]: unable to build EntityManagerFactory
body: <p>As stated on the subject, my problem is the <code>EntityManagerFactory</code> cannot be built. I am using Maven + Hibernate. I am connecting to a MySQL DB (<code>&lt;jdbc://mysql://localhost:3306/&lt;dbname&gt;</code>).  </p>
  
  <p>The weird thing here is during debugging in Eclipse, it is working fine. But when I build it using Maven build, the JAR file is throwing such error. I checked the Manifest file already and all the necessary JARs were included in the Class-Path. Below is the error of the JAR displayed in the console:</p>
  
  <p>===========================================================================</p>
  
  <pre><code>Feb 3, 2012 5:01:16 PM org.hibernate.annotations.common.Version &lt;clinit&gt;
  INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
  Feb 3, 2012 5:01:16 PM org.hibernate.Version logVersion
  INFO: HHH000412: Hibernate Core {4.0.1.Final}
  Feb 3, 2012 5:01:16 PM org.hibernate.cfg.Environment &lt;clinit&gt;
  INFO: HHH000206: hibernate.properties not found
  Feb 3, 2012 5:01:16 PM org.hibernate.cfg.Environment buildBytecodeProvider
  INFO: HHH000021: Bytecode provider name : javassist
  Feb 3, 2012 5:01:16 PM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
  INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)
  Feb 3, 2012 5:01:16 PM class &lt;name&gt;.&lt;name&gt;.&lt;name&gt; &lt;name&gt;
  SEVERE: [ERROR]: [PersistenceUnit: &lt;name&gt;] Unable to build EntityManagerFactory
  [ERROR]: [PersistenceUnit: &lt;name&gt;] Unable to build EntityManagerFactory
  </code></pre>
  
  <p>===========================================================================</p>
  
  <h1>below is my persistence.xml:</h1>
  
  <pre><code>&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
  http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
  version="1.0"&gt;
  &lt;persistence-unit name="&lt;name&gt;"&gt;
  &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
  &lt;class&gt;classname&lt;/class&gt;
  &lt;properties&gt;
  &lt;!-- &lt;property name="hibernate.ejb.cfgfile" value="/classifyPE.cfg.xml"/&gt; --&gt;
  &lt;property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" /&gt;
  &lt;property name="hibernate.connection.password" value="&lt;value&gt;" /&gt;
  &lt;property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/&lt;name&gt;" /&gt;
  &lt;property name="hibernate.connection.username" value="root" /&gt;
  &lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /&gt;
  &lt;/properties&gt;
  &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>===========================================================================</p>
  
  <p>What am I doing wrong here? Or what am I lacking?<br>
  As mentioned, it's working on Debug. But when I package it into JAR,(with all the necessary JARs present in the libs folder), it's not.</p>