1
resposta

javax.persistence.PersistenceException: No Persistence provider for EntityManager named

Se estiver com esse error Error out 02, 2020 5:16:49 PM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation INFO: HHH000204: Processing PersistenceUnitInfo [name: contas] out 02, 2020 5:16:49 PM org.hibernate.Version logVersion INFO: HHH000412: Hibernate ORM core version 5.4.21.Final out 02, 2020 5:16:50 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager INFO: HCANN000001: Hibernate Commons Annotations {5.1.0.Final} Exception in thread "main" org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]

adiciona esse código no lugar

correto

<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-agroal</artifactId>
  <version>5.4.22.Final</version>
  <type>pom</type>
</dependency>

errado

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-agroal</artifactId>
<version>5.4.21.Final</version>
</dependency>
1 resposta

Olá Julio, tudo bem? Ótima dica essa sua, e tenho certeza que vai ajudar muitas pessoas que podem vir a passar por esse problema! Continue assim e bons estudos!