Cai em outro erro e acredito que fiz tudo igual ao professor
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1"
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">
<persistence-unit name="contas">
<class>br.com.alura.jpa.modelo.Conta</class>
<properties>
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/alura_jpa?serverTimezone=UTC" />
<property name="javax.persistence.jdbc.user" value="root" />
<property name="javax.persistence.jdbc.password" value="xxx" />
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MariaDBDialect"/>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.format_sql" value="true"/>
</properties>
</persistence-unit>
</persistence>
``
Esse é o meu xml
package br.com.alura.jpa.testes;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import br.com.alura.jpa.modelo.Conta;
public class CriaConta {
public static void main(String[] args) {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("alura");
EntityManager em = emf.createEntityManager();
Conta conta = new Conta();
conta.setTitular("Rodrigo");
conta.setNumero(1234);
conta.setAgencia(4321);
em.persist(conta);
esse é meu codigo
Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named alura
esse é o erro