title: persistence.xml file is not in the classpath
body: <p>So I am trying to build an adminsystem in Eclipse with Maven using Wildfly, JPA, Hibernate and MariaDB. I configured my data source in the WildFly administration console and everything is fine.
  <a href="https://i.stack.imgur.com/eXKUb.png" rel="nofollow noreferrer">Succesful connection picture in WildFly</a>
  Now I am trying to write into the database with Entity Manager Factory in Eclipse from the project. But I've got this error message: 
  <a href="https://i.stack.imgur.com/cFSVo.png" rel="nofollow noreferrer">Error message in Eclipse</a>
  Here you can see my project tree:
  <a href="https://i.stack.imgur.com/zt8z7.png" rel="nofollow noreferrer">Project tree</a></p>
  
  <p><strong>Here is my pom:</strong></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;com.gyurmatag.adminsystem&lt;/groupId&gt;
  &lt;artifactId&gt;adminsystem&lt;/artifactId&gt;
  &lt;version&gt;1.0&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
  
      &lt;servlet.version&gt;3.1.0&lt;/servlet.version&gt;
      &lt;jsf.version&gt;2.2.12&lt;/jsf.version&gt;
      &lt;primefaces.version&gt;5.3&lt;/primefaces.version&gt;
  
      &lt;version.wildfly&gt;9.0.2.Final&lt;/version.wildfly&gt;
      &lt;jboss.home&gt;${project.build.directory}/wildfly-${version.wildfly}
      &lt;/jboss.home&gt;
      &lt;server.config&gt;standalone.xml&lt;/server.config&gt;
  
      &lt;maven-compiler-plugin.version&gt;3.3&lt;/maven-compiler-plugin.version&gt;
      &lt;maven-dependency-plugin&gt;2.10&lt;/maven-dependency-plugin&gt;
      &lt;maven-resources-plugin.version&gt;2.7&lt;/maven-resources-plugin.version&gt;
      &lt;wildfly-maven-plugin.version&gt;1.1.0.Alpha5&lt;/wildfly-maven-plugin.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;!-- Servlet --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
          &lt;version&gt;${servlet.version}&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- JSF --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
          &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
          &lt;version&gt;${jsf.version}&lt;/version&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
          &lt;artifactId&gt;jsf-impl&lt;/artifactId&gt;
          &lt;version&gt;${jsf.version}&lt;/version&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- PrimeFaces --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
          &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
          &lt;version&gt;${primefaces.version}&lt;/version&gt;
      &lt;/dependency&gt;       
  
      &lt;!-- https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-
  client --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.mariadb.jdbc&lt;/groupId&gt;
          &lt;artifactId&gt;mariadb-java-client&lt;/artifactId&gt;
          &lt;version&gt;2.2.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
          &lt;version&gt;5.2.12.Final&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-jpa-2.1-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.Final&lt;/version&gt;
      &lt;/dependency&gt;
  
  
      &lt;!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-
  entitymanager --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
          &lt;version&gt;5.2.12.Final&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  
  &lt;build&gt;
  &lt;pluginManagement&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;${maven-compiler-plugin.version}&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;${java.version}&lt;/source&gt;
                  &lt;target&gt;${java.version}&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;!-- Unpack the distribution --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
              &lt;version&gt;${maven-resources-plugin.version}&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;unpack-wildfly&lt;/id&gt;
                      &lt;phase&gt;generate-sources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;unpack&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;artifactItems&gt;
                              &lt;artifactItem&gt;
                                  &lt;groupId&gt;org.wildfly&lt;/groupId&gt;
                                  &lt;artifactId&gt;wildfly-dist&lt;/artifactId&gt;
                                  &lt;version&gt;${version.wildfly}&lt;/version&gt;
                                  &lt;type&gt;zip&lt;/type&gt;
                                  &lt;overWrite&gt;false&lt;/overWrite&gt;
                                  &lt;outputDirectory&gt;${project.build.directory}
  &lt;/outputDirectory&gt;
                              &lt;/artifactItem&gt;
                          &lt;/artifactItems&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;!-- Copy server configuration --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
              &lt;version&gt;${maven-resources-plugin.version}&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;copy-standalone-xml&lt;/id&gt;
                      &lt;phase&gt;generate-sources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;copy-resources&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
  
  &lt;outputDirectory&gt;${jboss.home}/standalone/configuration&lt;/outputDirectory&gt;
                          &lt;resources&gt;
                              &lt;resource&gt;
                                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
                              &lt;/resource&gt;
                          &lt;/resources&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;!-- Maven WildFly plugin --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.wildfly.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;wildfly-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;${wildfly-maven-plugin.version}&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;jbossHome&gt;${jboss.home}&lt;/jbossHome&gt;
                  &lt;serverConfig&gt;${server.config}&lt;/serverConfig&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Here is my persistance.xml:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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_2_0.xsd"
           version="2.0"&gt;
  
             &lt;persistence-unit name="adminsystem" transaction-type="JTA"&gt;
             &lt;provider&gt;org.hibernate.jpa.HibernatePersistenceProvider&lt;/provider&gt;
  
                 &lt;jta-data-source&gt;jboss/MariaDBDS&lt;/jta-data-source&gt;
  
  
                 &lt;properties&gt;
                       &lt;property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" /&gt;
                       &lt;property name="hibernate.hbm2ddl.auto" value="validate" /&gt;
                       &lt;property name="hibernate.show_sql" value="true" /&gt;
                       &lt;property name="hibernate.format_sql" value="true" /&gt;
                       &lt;property name="hibernate.connection.release_mode" value="auto" /&gt;
                 &lt;/properties&gt;
             &lt;/persistence-unit&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Here is my JPAUtility class:</strong></p>
  
  <pre><code>package com.gyurmatag.adminsystem.model;
  
  
  import javax.persistence.EntityManager;
  import javax.persistence.EntityManagerFactory;
  import javax.persistence.Persistence;
  
  
  public class JPAUtility {
  private static final EntityManagerFactory emFactory;
  static {
         emFactory = Persistence.createEntityManagerFactory("adminsystem");
  }
  public static EntityManager getEntityManager(){
      return emFactory.createEntityManager();
  }
  public static void close(){
      emFactory.close();
  }
  } 
  </code></pre>
  
  <p>If you want to take a more closer look to my project, you can find it here: <a href="https://bitbucket.org/gyurmatag/adminsystem" rel="nofollow noreferrer">Bitbucket repo</a></p>
  
  <p>Can you help me with this?</p>
  
  <p>Thank you very much! :) </p>