title: JPA ClassFormat Error "Absent Code attribute in method that is not native or abstract in class file javax/persistence/Persistence"
body: <p>I get error from eclipse when I try to invoke a 100% working code. It is for example working in my netbeans but not this eclipse project.  The error is absurd and I am almost sure it's caused by some Maven dependency for OPEN JPA that I'm using. Any pointers?  </p>
  
  <pre><code>Map&lt;String,String&gt; properties = new HashMap&lt;String,String&gt;();
  properties.put(PersistenceUnitProperties.JDBC_PASSWORD, "");
  properties.put(PersistenceUnitProperties.JDBC_USER, "root");
  properties.put(PersistenceUnitProperties.JDBC_URL, "jdbc:mysql://localhost:3306/mydb");
  properties.put(PersistenceUnitProperties.JDBC_DRIVER, "com.mysql.jdbc.Driver");
  
  emf = Persistence.createEntityManagerFactory("Persistentunitname", properties);
  </code></pre>
  
  <p>The error occurs on the last line, and the error is:</p>
  
  <blockquote>
    <p><strong>ClassFormat Error "Absent Code attribute in method that is not native or abstract in class file javax/persistence/Persistence"</strong></p>
  </blockquote>