title: Can't connect to JDBC From persistence.xml
body: <p>I have plain java class book annotated as Entity for jpa.
  I configure persistence xml, but i have big stack trace with exception which i don't understand. Also, i can't find jdbc package in javax.persistence. What do me?</p>
  
  <p>This is my Entity</p>
  
  <pre><code>package Java.JPA;
  
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.Id;
  
  @Entity
  public class Book
  {
    @Id @GeneratedValue
    private long id;
    private String title;
  
    public Book()
    {
  
    }
  
    public Book(String title) {
      this.title = title;
    }
  
    public String getTitle()
    {
      return title;
    }
  
    public void setTitle(String title) {
      this.title = title;
    }
  }
  </code></pre>
  
  <p>this is my main class </p>
  
  <pre><code>package Java;
  
  import Java.JPA.Book;
  import java.sql.SQLException;
  import javax.persistence.EntityManager;
  import javax.persistence.EntityManagerFactory;
  import javax.persistence.EntityTransaction;
  import javax.persistence.Persistence;
  
  public class main
  {
  
    public static void main(String[] args) throws SQLException, ClassNotFoundException {
      EntityManagerFactory emf = Persistence.createEntityManagerFactory("example");
      EntityManager em = emf.createEntityManager();
      Book book = new Book("TestJPA");
      EntityTransaction tx = em.getTransaction();
      tx.begin();
      em.persist(book);
      tx.commit();
  
      em.close();
      emf.close();
    }
  }
  </code></pre>
  
  <p>and this is my persistence.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &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="example"&gt;
      &lt;!--&lt;provider&gt;org.hibernate.jpa.HibernatePersistenceProvider&lt;/provider&gt;--&gt;
      &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
  
      &lt;class&gt;Java.JPA.Book&lt;/class&gt;
      &lt;properties&gt;
        &lt;property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/&gt;
        &lt;property name="javax.persistence.jdbc.driver" value="com.mysql.cj.jdbc.Driver"/&gt;
        &lt;property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/studyJPA"/&gt;
        &lt;property name="javax.persistence." value="root"/&gt;
        &lt;property name="javax.persistence.jdbc.password" value="root"/&gt;
      &lt;/properties&gt;
    &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>stack trace:</p>
  
  <pre><code>"C:\Program Files\Java\jdk1.8.0_92\bin\java" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.2\lib\idea_rt.jar=55859:C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_92\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_92\jre\lib\rt.jar;C:\Tomcat\apache-tomcat-9.0.7\lib\servlet-api.jar;C:\Users\Anton\Desktop\study\target\classes;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\javaee-api-7.0-1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\jsp-api.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomcat-api.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\servlet-api.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\el-api.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\jasper.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\catalina.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\ecj-4.6.3.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\jasper-el.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\jaspic-api.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomcat-jni.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\catalina-ha.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\serp-1.15.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomcat-dbcp.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomcat-jdbc.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomcat-util.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\xalan-2.7.2.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\catalina-ant.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\hawtbuf-1.11.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\howl-1.0.1-1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\hsqldb-2.3.2.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\jasypt-1.9.2.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\mimepull-1.9.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\neethi-3.0.3.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\wsdl4j-1.6.3.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\xmlsec-2.0.6.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\joda-time-2.7.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openjpa-2.4.3.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\stax-ex-1.7.4.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomcat-coyote.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\websocket-api.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\activation-1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\bval-jsr-1.1.2.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\jaxb-api-2.3.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\stax-api-1.0-2.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomcat-i18n-es.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomcat-i18n-fr.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomcat-i18n-ja.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\bval-core-1.1.2.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\catalina-tribes.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\commons-cli-1.2.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cryptacular-1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-core-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\jaxb-core-2.3.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\jaxb-impl-2.3.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\stax2-api-3.1.4.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\sxc-runtime-0.8.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\commons-lang-2.6.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\saaj-impl-1.3.23.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\serializer-2.7.2.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\slf4j-api-1.7.21.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomcat-util-scan.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomcat-websocket.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomee-jdbc-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\xbean-naming-4.9.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\xml-resolver-1.2.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\commons-dbcp2-2.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\commons-lang3-3.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\commons-pool2-2.3.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-api-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-cxf-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-javaagent.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-jee-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\sxc-jaxb-core-0.8.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomee-jaxrs-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\xbean-reflect-4.9.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\activemq-ra-5.14.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\commons-codec-1.10.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-wsdl-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\java-support-7.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\johnzon-core-1.0.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\myfaces-api-2.2.12.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-core-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-ejbd-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-hsql-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-http-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-rest-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\slf4j-jdk14-1.7.21.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomee-common-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomee-loader-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomee-webapp-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\wss4j-policy-2.1.9.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\bcprov-jdk15on-1.60.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\commons-logging-1.2.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\johnzon-jaxrs-1.0.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\johnzon-jsonb-1.0.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\myfaces-impl-2.2.12.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-core-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomee-mojarra-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomee-myfaces-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\catalina-storeconfig.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\commons-digester-1.8.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\commons-jcs-core-2.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\johnzon-mapper-1.0.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-client-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-cxf-rs-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-loader-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-server-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\swizzle-stream-1.6.2.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomee-catalina-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\wss4j-bindings-2.1.9.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\xmlschema-core-2.2.3.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\activemq-protobuf-1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-ws-addr-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openwebbeans-ee-1.7.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\xbean-asm6-shaded-4.9.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\xbean-bundleutils-4.9.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\activemq-broker-5.14.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\activemq-client-5.14.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\commons-jcs-jcache-2.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-security-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openwebbeans-ejb-1.7.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openwebbeans-jsf-1.7.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openwebbeans-spi-1.7.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openwebbeans-web-1.7.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\commons-beanutils-1.9.3.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-rs-client-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-ws-policy-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-saml-api-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-soap-api-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openwebbeans-el22-1.7.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openwebbeans-impl-1.7.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\tomee-webservices-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\woodstox-core-asl-4.4.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\xbean-finder-shaded-4.9.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-management-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\geronimo-connector-3.1.4.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-saml-impl-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-xacml-api-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\commons-collections-3.2.2.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-ws-security-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-webservices-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-xacml-impl-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-xmlsec-api-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\activemq-jdbc-store-5.14.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-bindings-xml-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\geronimo-transaction-3.1.4.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\mbean-annotation-api-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-profile-api-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-xmlsec-impl-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\quartz-openejb-shade-2.2.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-bindings-soap-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-rs-json-basic-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-security-saml-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\geronimo-jsonb_1.0_spec-1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-cxf-transport-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-jee-accessors-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-security-api-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\taglibs-standard-impl-1.2.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\taglibs-standard-spec-1.2.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\wss4j-ws-security-dom-2.1.9.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\activemq-kahadb-store-5.14.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-frontend-jaxrs-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-frontend-jaxws-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-security-impl-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openwebbeans-ee-common-1.7.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\wss4j-ws-security-stax-2.1.9.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\batchee-jbatch-0.4-incubating.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-frontend-simple-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-transports-http-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\openejb-jpa-integration-7.1.0.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-xacml-saml-api-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\taglibs-standard-jstlel-1.2.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-databinding-jaxb-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-rs-security-cors-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-rs-security-jose-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\opensaml-xacml-saml-impl-3.1.1.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\wss4j-ws-security-common-2.1.9.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\activemq-openwire-legacy-5.14.5.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-rs-security-oauth2-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-rs-extension-search-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\wss4j-ws-security-policy-stax-2.1.9.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-rs-extension-providers-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-rs-security-jose-jaxrs-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\cxf-rt-rs-service-description-3.1.15.jar;D:\Program\TomEE+\apache-tomee-plus-7.1.0\lib\geronimo-javamail_1.4_mail-1.9.0-alpha-2.jar;C:\Users\Anton\.m2\repository\mysql\mysql-connector-java\8.0.12\mysql-connector-java-8.0.12.jar;C:\Users\Anton\.m2\repository\com\google\protobuf\protobuf-java\2.6.0\protobuf-java-2.6.0.jar;C:\Users\Anton\.m2\repository\org\hibernate\hibernate-core\5.3.6.Final\hibernate-core-5.3.6.Final.jar;C:\Users\Anton\.m2\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;C:\Users\Anton\.m2\repository\javax\persistence\javax.persistence-api\2.2\javax.persistence-api-2.2.jar;C:\Users\Anton\.m2\repository\org\javassist\javassist\3.23.1-GA\javassist-3.23.1-GA.jar;C:\Users\Anton\.m2\repository\net\bytebuddy\byte-buddy\1.8.17\byte-buddy-1.8.17.jar;C:\Users\Anton\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\Anton\.m2\repository\org\jboss\spec\javax\transaction\jboss-transaction-api_1.2_spec\1.1.1.Final\jboss-transaction-api_1.2_spec-1.1.1.Final.jar;C:\Users\Anton\.m2\repository\org\jboss\jandex\2.0.5.Final\jandex-2.0.5.Final.jar;C:\Users\Anton\.m2\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;C:\Users\Anton\.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;C:\Users\Anton\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\Anton\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.0.4.Final\hibernate-commons-annotations-5.0.4.Final.jar;C:\Users\Anton\.m2\repository\org\eclipse\persistence\javax.persistence\2.2.1\javax.persistence-2.2.1.jar;C:\Users\Anton\.m2\repository\org\eclipse\persistence\org.eclipse.persistence.jpa\2.7.3\org.eclipse.persistence.jpa-2.7.3.jar;C:\Users\Anton\.m2\repository\org\eclipse\persistence\org.eclipse.persistence.asm\2.7.3\org.eclipse.persistence.asm-2.7.3.jar;C:\Users\Anton\.m2\repository\org\eclipse\persistence\org.eclipse.persistence.antlr\2.7.3\org.eclipse.persistence.antlr-2.7.3.jar;C:\Users\Anton\.m2\repository\javax\json\javax.json-api\1.1.2\javax.json-api-1.1.2.jar;C:\Users\Anton\.m2\repository\org\eclipse\persistence\org.eclipse.persistence.jpa.jpql\2.7.3\org.eclipse.persistence.jpa.jpql-2.7.3.jar;C:\Users\Anton\.m2\repository\org\eclipse\persistence\org.eclipse.persistence.core\2.7.3\org.eclipse.persistence.core-2.7.3.jar" Java.main
  91  INFO   [main] openjpa.Runtime - OpenJPA dynamically loaded the class enhancer. Any classes that were not enhanced at build time will be enhanced when they are loaded by the JVM.
  121  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.4.3
  Exception in thread "main" &lt;openjpa-2.4.3-r422266:1833086 fatal user error&gt; org.apache.openjpa.persistence.ArgumentException: The persistence provider is attempting to use properties in the persistence.xml file to resolve the data source. A Java Database Connectivity (JDBC) driver or data source class name must be specified in the openjpa.ConnectionDriverName or javax.persistence.jdbc.driver property. The following properties are available in the configuration: "org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl@2655aabb". 
      at org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:71)
      at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:850)
      at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:603)
      at org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration(MappingRepository.java:1520)
      at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:535)
      at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:460)
      at org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:121)
      at org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate(MetaDataRepositoryValue.java:68)
      at org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:83)
      at org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:973)
      at org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:964)
      at org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:642)
      at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:202)
      at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:154)
      at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:226)
      at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:153)
      at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:59)
      at Java.main.main(main.java:15)
  
  Process finished with exit code 1
  </code></pre>
  
  <p>in dependencies pom.xml there are hibernate and mysql driver. Also, i import javaee-api-7.0-1.jar, servlet-api.jar and jsp-api.jar from tomcat's directory. Please help. More than several hours i trying to solve it. I will be grateful!</p>
  
  <p>this is my java ee jar file. There is not jdbc package or another files with name "jdbc"</p>
  
  <p><a href="https://i.stack.imgur.com/2B2Y3.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>maybe, i downloaded wrong tomcat ee. If this is true, give me a link for download correct version.</p>
  
  <p>I don't know what happened, but i have new exception </p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/geronimo/osgi/locator/ProviderLocator
      at javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(PersistenceProviderResolverHolder.java:108)
      at javax.persistence.Persistence.getProviders(Persistence.java:275)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:88)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:72)
      at Java.main.main(main.java:14)
  Caused by: java.lang.ClassNotFoundException: org.apache.geronimo.osgi.locator.ProviderLocator
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 5 more
  </code></pre>
  
  <p>It's magic:) Now i have a question. How to fix that?</p>