title: JPA Hibernate Configuration Errors
body: <p>I want to enable JPA for an EJB module, in an IntelliJ J2E project. I don't have an existing database schema to import; I want to generate the schema and tables from my EJB POJO class. I then want to generate ORM mappings.</p>
  
  <p>I've enabled JavaEE Persistence framework support in IntelliJ, with Hibernate as the provider. I've updated persistence.xml and assigned MySQL@localhost as the data source, to the JPA persistence unit. I've also added the JPA descriptor to the ear artifact.</p>
  
  <p>When I try to add the JPA annotations to my POJO, e.g. @Table, @Column etc, I get an error "Cannot resolve table 'TABLE_NAME'"...same applies for columns. The context action I get is 'Assign Data Sources', but the data source is showing as assigned to the persistence unit.</p>
  
  <p>I've run the code and now just get a huge stack trace.</p>
  
  <p>The tutorials i've found are either for importing an existing schema (which I don't have), or use other IDEs. My persistence.xml and one of my pojos are included below</p>
  
  <p>Thanks in advance..</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&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_2.xsd"
               version="2.2"&gt;
  
      &lt;persistence-unit name="NewPersistenceUnit" transaction-type="JTA"&gt;
          &lt;provider&gt;org.hibernate.jpa.HibernatePersistenceProvider&lt;/provider&gt;
  
          &lt;properties&gt;
  
              &lt;property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/&gt;
              &lt;property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/MySQL"/&gt;
              &lt;property name="javax.persistence.jdbc.user" value="root"/&gt;
              &lt;property name="javax.persistence.jdbc.password" value="***"/&gt;
  
              &lt;!--Hibernate properties--&gt;
              &lt;property name="hibernate.show_sql" value="false"/&gt;
              &lt;property name="hibernate.format_sql" value="false"/&gt;
              &lt;property name="hibernate.hbm2ddl.auto" value="update"/&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>POJO</p>
  
  <pre><code>@Entity
  @Table(name = "CATALOG_ITEM")
  public class CatalogItem {
  
      @Id
      @Column(name = "CATALOG_ITEM_ID")
      private Long itemID;
      private String name;
      private String manufacturer;
      private String description;
      private Date availableDate;
  
      public CatalogItem() {
  
      }
  </code></pre>
  
  <p>GlassFish Log</p>
  
  <pre><code>[2020-05-29 12:56:46,830] Artifact jpa:ear: Error during artifact deployment. See server log for details.
  [2020-05-29 12:56:46,830] Artifact jpa:ear: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while preparing the app : [PersistenceUnit: NewPersistenceUnit] Unable to build Hibernate SessionFactory. Please see server.log for more details.
  Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method : javax.persistence.PersistenceException: [PersistenceUnit: NewPersistenceUnit] Unable to build Hibernate SessionFactory
  [PersistenceUnit: NewPersistenceUnit] Unable to build Hibernate SessionFactory
  </code></pre>
  
  <p>Server Log</p>
  
  <pre><code>[2020-05-29T00:56:46.782+0100] [glassfish 5.1] [SEVERE] [] [] [tid: _ThreadID=52 _ThreadName=Thread-9] [timeMillis: 1590710206782] [levelValue: 1000] [[
    org.glassfish.deployment.common.DeploymentException: [PersistenceUnit: NewPersistenceUnit] Unable to build Hibernate SessionFactory
      at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:158)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:901)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:195)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:467)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:516)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:512)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:360)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:511)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:542)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:534)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:360)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:533)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1441)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:86)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1823)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1699)
      at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:510)
      at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:200)
      at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:166)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:439)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:144)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:182)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:156)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:218)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:260)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:177)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:109)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:88)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:515)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
      at java.lang.Thread.run(Thread.java:748)
  Caused by: javax.persistence.PersistenceException: [PersistenceUnit: NewPersistenceUnit] Unable to build Hibernate SessionFactory
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1314)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1240)
      at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:141)
      at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:175)
      at org.glassfish.persistence.jpa.PersistenceUnitLoader.&lt;init&gt;(PersistenceUnitLoader.java:83)
      at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:199)
      at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:486)
      at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:206)
      at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:144)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:901)
      at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:285)
      at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:64)
      at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:131)
      at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:128)
      at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:208)
      at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:217)
    RAR5038:Unexpected exception while creating resource for pool DerbyPool. Exception : javax.resource.spi.ResourceAllocationException: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1,527 with message Connection refused (Connection refused).]]
  
    RAR5117 : Failed to obtain/create connection from connection pool [ DerbyPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1,527 with message Connection refused (Connection refused).]]
  
    RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1,527 with message Connection refused (Connection refused).]]]
  
    HHH000342: Could not obtain connection to query metadata : Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1,527 with message Connection refused (Connection refused).]]
  
      at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:243)
      at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:128)
      ... 40 more
  Caused by: org.hibernate.HibernateException: DdlTransactionIsolatorJtaImpl could not locate TransactionManager to suspend any current transaction; base JtaPlatform impl (org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform@45dad759)?
      at org.hibernate.resource.transaction.backend.jta.internal.DdlTransactionIsolatorJtaImpl.&lt;init&gt;(DdlTransactionIsolatorJtaImpl.java:46)
      at org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorBuilderImpl.buildDdlTransactionIsolator(JtaTransactionCoordinatorBuilderImpl.java:46)
      at org.hibernate.tool.schema.internal.HibernateSchemaManagementTool.getDdlTransactionIsolator(HibernateSchemaManagementTool.java:175)
      at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:94)
      at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:184)
      at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:73)
      at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:314)
      at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:468)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1237)
      ... 56 more
  ]]
  
  [2020-05-29T00:56:46.784+0100] [glassfish 5.1] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=52 _ThreadName=admin-listener(4)] [timeMillis: 1590710206784] [levelValue: 1000] [[
    Exception while preparing the app]]
  
  [2020-05-29T00:56:46.784+0100] [glassfish 5.1] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=52 _ThreadName=admin-listener(4)] [timeMillis: 1590710206784] [levelValue: 1000] [[
    Exception during lifecycle processing
  org.glassfish.deployment.common.DeploymentException: [PersistenceUnit: NewPersistenceUnit] Unable to build Hibernate SessionFactory
      at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:158)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:901)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:195)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:467)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:516)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:512)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:360)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:511)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:542)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:534)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:360)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:533)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1441)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:86)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1823)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1699)
      at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:510)
      at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:200)
      at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:166)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:439)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:144)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:182)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:156)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:218)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:260)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:177)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:109)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:88)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:515)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
      at java.lang.Thread.run(Thread.java:748)
  Caused by: javax.persistence.PersistenceException: [PersistenceUnit: NewPersistenceUnit] Unable to build Hibernate SessionFactory
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1314)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1240)
      at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:141)
      at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:175)
      at org.glassfish.persistence.jpa.PersistenceUnitLoader.&lt;init&gt;(PersistenceUnitLoader.java:83)
      at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:199)
      at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:486)
      at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:206)
      at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:144)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:901)
      at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:285)
      at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:64)
      at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:131)
      at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:128)
      at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:208)
      at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:217)
      at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:243)
      at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:128)
      ... 40 more
  Caused by: org.hibernate.HibernateException: DdlTransactionIsolatorJtaImpl could not locate TransactionManager to suspend any current transaction; base JtaPlatform impl (org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform@45dad759)?
      at org.hibernate.resource.transaction.backend.jta.internal.DdlTransactionIsolatorJtaImpl.&lt;init&gt;(DdlTransactionIsolatorJtaImpl.java:46)
      at org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorBuilderImpl.buildDdlTransactionIsolator(JtaTransactionCoordinatorBuilderImpl.java:46)
      at org.hibernate.tool.schema.internal.HibernateSchemaManagementTool.getDdlTransactionIsolator(HibernateSchemaManagementTool.java:175)
      at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:94)
      at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:184)
      at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:73)
      at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:314)
      at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:468)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1237)
      ... 56 more
  ]]
  
  [2020-05-29T00:56:46.812+0100] [glassfish 5.1] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=52 _ThreadName=admin-listener(4)] [timeMillis: 1590710206812] [levelValue: 1000] [[
    Exception while preparing the app : [PersistenceUnit: NewPersistenceUnit] Unable to build Hibernate SessionFactory
  javax.persistence.PersistenceException: [PersistenceUnit: NewPersistenceUnit] Unable to build Hibernate SessionFactory
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1314)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1240)
      at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:141)
      at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:175)
      at org.glassfish.persistence.jpa.PersistenceUnitLoader.&lt;init&gt;(PersistenceUnitLoader.java:83)
      at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:199)
      at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:486)
      at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:206)
      at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:144)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:901)
      at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:285)
      at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:64)
      at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:131)
      at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:128)
      at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:208)
      at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:217)
      at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:243)
      at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:128)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:901)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:195)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:467)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:516)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:512)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:360)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:511)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:542)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:534)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:360)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:533)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1441)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:86)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1823)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1699)
      at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:510)
      at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:200)
      at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:166)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:439)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:144)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:182)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:156)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:218)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:260)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:177)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:109)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:88)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:515)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
      at java.lang.Thread.run(Thread.java:748)
  Caused by: org.hibernate.HibernateException: DdlTransactionIsolatorJtaImpl could not locate TransactionManager to suspend any current transaction; base JtaPlatform impl (org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform@45dad759)?
      at org.hibernate.resource.transaction.backend.jta.internal.DdlTransactionIsolatorJtaImpl.&lt;init&gt;(DdlTransactionIsolatorJtaImpl.java:46)
      at org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorBuilderImpl.buildDdlTransactionIsolator(JtaTransactionCoordinatorBuilderImpl.java:46)
      at org.hibernate.tool.schema.internal.HibernateSchemaManagementTool.getDdlTransactionIsolator(HibernateSchemaManagementTool.java:175)
      at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:94)
      at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:184)
      at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:73)
      at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:314)
      at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:468)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1237)
      ... 56 more
  ]]
  </code></pre>