How to make JPA create tables using JAVA SE and Tomcat?
<p>Im creating a simple Java SE application but I have a problem configuring JPA with Tomcat 8.0.38. Is it possible to automatically generate the schema using these technologies?</p>

<p>This is 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="postgres" transaction-type="RESOURCE_LOCAL"&gt;
    &lt;provider&gt;org.hibernate.jpa.HibernatePersistenceProvider&lt;/provider&gt;
    &lt;class&gt;co.entity.Pais&lt;/class&gt;
    &lt;class&gt;co.entity.PilaEntity&lt;/class&gt;
    &lt;class&gt;co.entity.PilaNovedad&lt;/class&gt;
    &lt;class&gt;co.entity.PilaPago&lt;/class&gt;
    &lt;class&gt;co.entity.PilaRisk&lt;/class&gt;
    &lt;class&gt;co.entity.PilaSuperEntity&lt;/class&gt;
    &lt;class&gt;co.edu.entity.PilaUser&lt;/class&gt;
    &lt;class&gt;co.edu.entity.PilaUserIntermediary&lt;/class&gt;
    &lt;class&gt;co.edu.entity.PilaUserSuperEntity&lt;/class&gt;

    &lt;properties&gt;
        &lt;property name="hibernate.connection.url"     value="jdbc:postgresql://localhost/pila" /&gt;
        &lt;property name="hibernate.connection.driver_class"     value="org.postgresql.Driver" /&gt;
        &lt;property name="hibernate.connection.username" value="user" /&gt;
        &lt;property name="hibernate.connection.password" value="password" /&gt;

        &lt;property name="hibernate.dialect"    value="org.hibernate.dialect.PostgreSQLDialect" /&gt;
        &lt;property name="hibernate.hbm2ddl.auto" value="create-drop" /&gt;
    &lt;/properties&gt;
&lt;/persistence-unit&gt;
&lt;/persistence&gt;
</code></pre>

<p>This is my 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/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;PilaPayments&lt;/groupId&gt;
  &lt;artifactId&gt;PilaPayments&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;build&gt;
&lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
&lt;plugins&gt;
  &lt;plugin&gt;
    &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
    &lt;version&gt;3.5.1&lt;/version&gt;
    &lt;configuration&gt;
      &lt;source&gt;1.8&lt;/source&gt;
      &lt;target&gt;1.8&lt;/target&gt;
    &lt;/configuration&gt;
  &lt;/plugin&gt;
  &lt;plugin&gt;
    &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
    &lt;version&gt;3.0.0&lt;/version&gt;
    &lt;configuration&gt;
      &lt;warSourceDirectory&gt;WebContent&lt;/warSourceDirectory&gt;
    &lt;/configuration&gt;
  &lt;/plugin&gt;
&lt;/plugins&gt;
  &lt;/build&gt;
  &lt;dependencies&gt;
    &lt;!-- https://mvnrepository.com/artifact/org.json/json --&gt;
    &lt;dependency&gt;
    &lt;groupId&gt;org.json&lt;/groupId&gt;
    &lt;artifactId&gt;json&lt;/artifactId&gt;
    &lt;version&gt;20160212&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;javax.ws.rs&lt;/groupId&gt;
    &lt;artifactId&gt;javax.ws.rs-api&lt;/artifactId&gt;
    &lt;version&gt;2.0.1&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&lt;/artifactId&gt;
        &lt;version&gt;2.22.2&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
        &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
        &lt;version&gt;2.22.2&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
        &lt;artifactId&gt;jersey-client&lt;/artifactId&gt;
        &lt;version&gt;2.22.2&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
        &lt;artifactId&gt;jersey-common&lt;/artifactId&gt;
        &lt;version&gt;2.22.2&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;version&gt;2.22.2&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- https://mvnrepository.com/artifact/org.glassfish.jersey.bundles.repackaged/jersey-guava --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.jersey.bundles.repackaged&lt;/groupId&gt;
        &lt;artifactId&gt;jersey-guava&lt;/artifactId&gt;
        &lt;version&gt;2.22.2&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- https://mvnrepository.com/artifact/org.glassfish.hk2/hk2-api --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.hk2&lt;/groupId&gt;
        &lt;artifactId&gt;hk2-api&lt;/artifactId&gt;
        &lt;version&gt;2.4.0&lt;/version&gt;
    &lt;/dependency&gt;

     &lt;!-- https://mvnrepository.com/artifact/org.glassfish.hk2/hk2-locator --&gt;
     &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.hk2&lt;/groupId&gt;
        &lt;artifactId&gt;hk2-locator&lt;/artifactId&gt;
        &lt;version&gt;2.4.0&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- https://mvnrepository.com/artifact/org.glassfish.hk2/hk2-utils --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.hk2&lt;/groupId&gt;
        &lt;artifactId&gt;hk2-utils&lt;/artifactId&gt;
        &lt;version&gt;2.4.0&lt;/version&gt;
    &lt;/dependency&gt;
&lt;!-- https://mvnrepository.com/artifact/javax.validation/validation-api --&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;javax.validation&lt;/groupId&gt;
            &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
            &lt;version&gt;1.1.0.Final&lt;/version&gt;
        &lt;/dependency&gt;
    &lt;!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
        &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;
        &lt;version&gt;2.6.2&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- https://mvnrepository.com/artifact/org.glassfish.jersey.media/jersey-media-json-jackson --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
        &lt;artifactId&gt;jersey-media-json-jackson&lt;/artifactId&gt;
        &lt;version&gt;2.22.2&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.fasterxml.jackson.jaxrs&lt;/groupId&gt;
        &lt;artifactId&gt;jackson-jaxrs-json-provider&lt;/artifactId&gt;
        &lt;version&gt;2.7.8&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- https://mvnrepository.com/artifact/org.glassfish.jersey.ext/jersey-entity-filtering --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.jersey.ext&lt;/groupId&gt;
        &lt;artifactId&gt;jersey-entity-filtering&lt;/artifactId&gt;
        &lt;version&gt;2.22.2&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;javax.persistence&lt;/groupId&gt;
        &lt;artifactId&gt;persistence-api&lt;/artifactId&gt;
        &lt;version&gt;1.0.2&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;5.2.3.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;dependency&gt;
        &lt;groupId&gt;postgresql&lt;/groupId&gt;
        &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
        &lt;version&gt;9.1-901-1.jdbc4&lt;/version&gt;
    &lt;/dependency&gt;
&lt;/dependencies&gt;
</code></pre>

<p></p>

<p>Console log when starting tomcat from eclipse</p>

<pre><code>nov 07, 2016 5:22:45 PM org.apache.tomcat.util.digester.SetPropertiesRule    begin
ADVERTENCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting    property 'source' to 'org.eclipse.jst.jee.server:PilaPayments' did not find a      matching property.
nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: Server version:        Apache Tomcat/8.0.38
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener    log
 INFORMACIÓN: Server built:          Oct 6 2016 20:51:55 UTC
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: Server number:         8.0.38.0
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: OS Name:               Windows 7
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: OS Version:            6.1
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: Architecture:          amd64
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: Java Home:             C:\Program Files\Java\jdk1.8.0_91\jre
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: JVM Version:           1.8.0_91-b15
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: JVM Vendor:            Oracle Corporation
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: CATALINA_BASE:         C:\Program Files\Apache Software    Foundation\Tomcat 8.0
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: CATALINA_HOME:         C:\Program Files\Apache Software    Foundation\Tomcat 8.0
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: Command line argument: -Dcatalina.base=C:\Program Files\Apache    Software Foundation\Tomcat 8.0
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: Command line argument: -Dcatalina.home=C:\Program Files\Apache     Software Foundation\Tomcat 8.0
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: Command line argument: -Dwtp.deploy=C:\Program Files\Apache   Software Foundation\Tomcat 8.0\wtpwebapps
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: Command line argument: -Djava.endorsed.dirs=C:\Program     Files\Apache Software Foundation\Tomcat 8.0\endorsed
 nov 07, 2016 5:22:45 PM org.apache.catalina.startup.VersionLoggerListener log
 INFORMACIÓN: Command line argument: -Dfile.encoding=Cp1252
 nov 07, 2016 5:22:45 PM org.apache.catalina.core.AprLifecycleListener    lifecycleEvent
 INFORMACIÓN: La biblioteca nativa de Apache Tomcat basada en ARP que   permite un rendimiento óptimo en entornos de desarrollo no ha sido hallada en     java.library.path: C:\Program   Files\Java\jdk1.8.0_91\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Window      s;C:/Program Files (x86)/Java/jre1.8.0_101/bin/client;C:/Program Files      (x86)/Java/jre1.8.0_101/bin;C:/Program Files    (x86)/Java/jre1.8.0_101/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Program     Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program    Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common     Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common    Files\Microsoft Shared\Windows    Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32     \WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows     Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-    Static;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files     (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows     Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL    Server\110\Tools\Binn\;C:\Program Files (x86)\AMD\ATI.ACE\Core-    Static;C:\Python27;C:\Python27\Scripts;C:\Program Files (x86)\Microsoft      SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL     Server\120\Tools\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\Program      Files\nodejs\;D:\Software\apache-maven-3.3.9\bin;C:\Program      Files\PostgreSQL\pg95\bin;C:\Program Files\Perforce;C:\Program       Files\Perforce\DVCS\;C:\Program      Files\Git\cmd;c:\Users\user1\AppData\Local\atom\bin;C:\Users\user1\AppData\Roami     ng\npm;D:\Software\eclipse;;.
 nov 07, 2016 5:22:46 PM org.apache.coyote.AbstractProtocol init
 INFORMACIÓN: Initializing ProtocolHandler ["http-nio-8080"]
 nov 07, 2016 5:22:46 PM org.apache.tomcat.util.net.NioSelectorPool    getSharedSelector
 INFORMACIÓN: Using a shared selector for servlet write/read
 nov 07, 2016 5:22:46 PM org.apache.coyote.AbstractProtocol init
 INFORMACIÓN: Initializing ProtocolHandler ["ajp-nio-8009"]
 nov 07, 2016 5:22:46 PM org.apache.tomcat.util.net.NioSelectorPool    getSharedSelector
 INFORMACIÓN: Using a shared selector for servlet write/read
 nov 07, 2016 5:22:46 PM org.apache.catalina.startup.Catalina load
 INFORMACIÓN: Initialization processed in 2147 ms
 nov 07, 2016 5:22:46 PM org.apache.catalina.core.StandardService   startInternal
INFORMACIÓN: Arrancando servicio Catalina
nov 07, 2016 5:22:46 PM org.apache.catalina.core.StandardEngine    startInternal
INFORMACIÓN: Starting Servlet Engine: Apache Tomcat/8.0.38
nov 07, 2016 5:22:50 PM org.apache.jasper.servlet.TldScanner scanJars
INFORMACIÓN: Al menos un JAR, que se ha explorado buscando TLDs, aún no     contenía TLDs. Activar historial de depuración para este historiador para una    completa lista de los JARs que fueron explorados y de los que nos se halló TLDs.     Saltarse JARs no necesarios durante la exploración puede dar lugar a una mejora    de tiempo significativa en el arranque y compilación de JSP .
 nov 07, 2016 5:22:51 PM org.apache.catalina.util.SessionIdGeneratorBase     createSecureRandom
INFORMACIÓN: Creation of SecureRandom instance for session ID generation      using [SHA1PRNG] took [108] milliseconds.
nov 07, 2016 5:22:52 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMACIÓN: Despliegue del directorio C:\Program Files\Apache Software     Foundation\Tomcat 8.0\webapps\docs de la aplicación web
nov 07, 2016 5:22:52 PM org.apache.catalina.startup.HostConfig   deployDirectory
INFORMACIÓN: Deployment of web application directory C:\Program Files\Apache    Software Foundation\Tomcat 8.0\webapps\docs has finished in 49 ms
nov 07, 2016 5:22:52 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMACIÓN: Despliegue del directorio C:\Program Files\Apache Software     Foundation\Tomcat 8.0\webapps\manager de la aplicación web
nov 07, 2016 5:22:52 PM org.apache.catalina.startup.HostConfig   deployDirectory
INFORMACIÓN: Deployment of web application directory C:\Program Files\Apache      Software Foundation\Tomcat 8.0\webapps\manager has finished in 129 ms
nov 07, 2016 5:22:52 PM org.apache.catalina.startup.HostConfig  deployDirectory
INFORMACIÓN: Despliegue del directorio C:\Program Files\Apache Software    Foundation\Tomcat 8.0\webapps\ROOT de la aplicación web
nov 07, 2016 5:22:52 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMACIÓN: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT has finished in 40 ms
nov 07, 2016 5:22:52 PM org.apache.coyote.AbstractProtocol start
INFORMACIÓN: Starting ProtocolHandler ["http-nio-8080"]
nov 07, 2016 5:22:52 PM org.apache.coyote.AbstractProtocol start
INFORMACIÓN: Starting ProtocolHandler ["ajp-nio-8009"]
nov 07, 2016 5:22:52 PM org.apache.catalina.startup.Catalina start
INFORMACIÓN: Server startup in 6154 ms
</code></pre>

<p>At startup it only deploys the war but it doesn't create the schema</p>