title: Hibernate error in create entity manger [ java.lang.NoSuchMethodError: org.hibernate.cfg.Environment.verifyProperties(Ljava/util/Map;)V ]
body: <p>I'm using Hibernate as a provider for JPA in Java EE 6 and JBoss 7.1.1 Final. I searched for solutions but im new with hibernate and I don't fix the issue. Im getting this error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.cfg.Environment.verifyProperties(Ljava/util/Map;)V
  at org.hibernate.boot.registry.StandardServiceRegistryBuilder.build(StandardServiceRegistryBuilder.java:278)
  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.&lt;init&gt;(EntityManagerFactoryBuilderImpl.java:173)
  at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:34)
  at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilder(HibernatePersistenceProvider.java:165)
  at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilderOrNull(HibernatePersistenceProvider.java:114)
  at org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilderOrNull(HibernatePersistenceProvider.java:71)
  at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:52)
  at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:78)
  at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
  at Main.main(Main.java:13)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
  </code></pre>
  
  <p>My persistence.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
               version="2.0"
               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_2_0.xsd"&gt;
  
      &lt;persistence-unit name="manager1" transaction-type="JTA"&gt;
          &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
          &lt;properties&gt;
              &lt;property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/test_app"/&gt;
              &lt;property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/&gt;
              &lt;property name="hibernate.connection.username" value="test"/&gt;
              &lt;property name="hibernate.connection.password" value="test"/&gt;
              &lt;property name="hibernate.archive.autodetection" value="class"/&gt;
              &lt;property name="hibernate.show_sql" value="true"/&gt;
              &lt;property name="hibernate.format_sql" value="true"/&gt;
              &lt;property name="hbm2ddl.auto" value="create-drop"/&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>Main class for test the connection with DB</p>
  
  <pre><code>public class Main {
  public static void main(String[] args) {
          EntityManagerFactory emf = Persistence.createEntityManagerFactory("manager1");
      EntityManager em = emf.createEntityManager();
  
      // ----- Creating Users
  
      EntityTransaction t = em.getTransaction();
      t.begin();
  
      User usuario1 = new User();
      usuario1.setUser_Name("User1");
      usuario1.setUserMessage("Text example 1");
      em.persist(usuario1);
  
      User usuario2 = new User();
      usuario2.setUser_Name("User2");
      usuario2.setUser_Name("Text example 2");
      em.persist(usuario2);
  
      t.commit();
  
      em.close();
      emf.close();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>My libs</p>
  
  <p><a href="http://imgur.com/eL2KRXk" rel="nofollow">http://imgur.com/eL2KRXk</a></p>
  
  <p>My project folder structure</p>
  
  <p><a href="http://imgur.com/BxjE07u" rel="nofollow">http://imgur.com/BxjE07u</a></p>
  
  <p>And finally my pom.xml</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;agenda5&lt;/groupId&gt;
      &lt;artifactId&gt;agenda5&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  
          &lt;hibernate-core.version&gt;3.6.4.Final&lt;/hibernate-core.version&gt;
          &lt;mysql-connector-java.version&gt;5.1.16&lt;/mysql-connector-java.version&gt;
          &lt;slf4j.version&gt;1.6.1&lt;/slf4j.version&gt;
          &lt;log4j.version&gt;1.6.1&lt;/log4j.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;!-- HIBERNATE DEPENDENCIES --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
              &lt;version&gt;${hibernate-core.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- MYSQL DEPENDENCIES --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;version&gt;${mysql-connector-java.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Logging Dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;version&gt;${slf4j.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
              &lt;version&gt;${log4j.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  
  &lt;/project&gt;
  </code></pre>