title: Could not find any META-INF/persistence.xml file in the classpath
body: <p>I am tryig to set up JPA to my RESTful webapi in order to make CRUD services on database. I am getting the error <code>Could not find any META-INF/persistence.xml file in the classpath</code> But actually ther in a persistence.xml in the folder <code>META-INF</code></p>
  
  <pre><code>1 [main] INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.5.6-Final
      17 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.5.6-Final
      20 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
      23 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
      27 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
      110 [main] INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.2.0.Final
      115 [main] INFO org.hibernate.ejb.Version - Hibernate EntityManager 3.5.6-Final
      129 [main] INFO org.hibernate.ejb.Ejb3Configuration - Could not find any META-INF/persistence.xml file in the classpath
      Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named KAPAPLAN
          at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
          at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:32)
          at de.ham.ti.kapaplan.database.DBCon.main(DBCon.java:20)
  </code></pre>
  
  <p>here my persistence.xml</p>
  
  <pre><code>&lt;persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
  
  http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
  
    version="2.1"&gt;
  
    &lt;persistence-unit name="KAPAPLAN" transaction-type="JTA"&gt;
      &lt;provider&gt;org.hibernate.jpa.HibernatePersistenceProvider&lt;/provider&gt;
  
      &lt;class&gt;de.ham.ti.kapaplan.model&lt;/class&gt;
  
      &lt;properties&gt;
        &lt;!-- Configuring JDBC properties --&gt;
        &lt;property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@//***db-domain***/***service-name***" /&gt;
        &lt;property name="javax.persistence.jdbc.user" value="***user***" /&gt;
        &lt;property name="javax.persistence.jdbc.password" value="***pw***" /&gt;
        &lt;property name="javax.persistence.jdbc.driver" value="com.mysema.query.jpa.support.ExtendedOracleDialect" /&gt;
  
        &lt;!-- Hibernate properties --&gt;
        &lt;property name="hibernate.show_sql" value="true" /&gt;
        &lt;property name="hibernate.format_sql" value="true" /&gt;
        &lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" /&gt;
        &lt;property name="hibernate.hbm2ddl.auto" value="validate" /&gt;
  
        &lt;!-- Configuring Connection Pool --&gt;
        &lt;!-- &lt;property name="hibernate.c3p0.min_size" value="5" /&gt;
        &lt;property name="hibernate.c3p0.max_size" value="20" /&gt;
        &lt;property name="hibernate.c3p0.timeout" value="500" /&gt;
        &lt;property name="hibernate.c3p0.max_statements" value="50" /&gt;
        &lt;property name="hibernate.c3p0.idle_test_period" value="2000" /&gt;--&gt;
      &lt;/properties&gt;
    &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>I double checked similar questions but non of them solved my issue. ann ideas? </p>
  
  <p><strong>EDIT:</strong> my Maven pom.xml</p>
  
  <pre><code>&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/maven-v4_0_0.xsd"&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;de.ham.ti.kapaplan&lt;/groupId&gt;
      &lt;artifactId&gt;kapaplan&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;kapaplan&lt;/name&gt;
  
      &lt;build&gt;
          &lt;finalName&gt;kapaplan&lt;/finalName&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.5.1&lt;/version&gt;
                  &lt;inherited&gt;true&lt;/inherited&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.glassfish.jersey&lt;/groupId&gt;
                  &lt;artifactId&gt;jersey-bom&lt;/artifactId&gt;
                  &lt;version&gt;${jersey.version}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-simple&lt;/artifactId&gt;
              &lt;version&gt;1.6.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
              &lt;version&gt;3.5.6-Final&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-container-servlet-core&lt;/artifactId&gt;
              &lt;!-- use the following artifactId if you don't need servlet 2.x compatibility --&gt;
              &lt;!-- artifactId&gt;jersey-container-servlet&lt;/artifactId --&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-media-moxy&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.oracle&lt;/groupId&gt;
              &lt;artifactId&gt;ojdbc6&lt;/artifactId&gt;
              &lt;version&gt;11.2.0&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;properties&gt;
          &lt;jersey.version&gt;2.16&lt;/jersey.version&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
  &lt;/project&gt;
  </code></pre>