a instrução: private static final EntityManagerFactory factory = Persistence.createEntityManagerFactory("loja"); retorna exception:
"C:\Program Files\Amazon Corretto\jdk1.8.0_332\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.1\lib\idea_rt.jar=64290:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\charsets.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\ext\cldrdata.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\ext\dnsns.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\ext\jaccess.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\ext\jfxrt.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\ext\localedata.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\ext\nashorn.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\ext\sunec.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\ext\sunmscapi.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\ext\zipfs.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\jce.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\jfr.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\jfxswt.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\jsse.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\management-agent.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\resources.jar;C:\Program Files\Amazon Corretto\jdk1.8.0_332\jre\lib\rt.jar;C:\work\testes\lojaDireta\target\classes;C:\Users\EasyPro.m2\repository\jakarta\transaction\jakarta.transaction-api\2.0.0\jakarta.transaction-api-2.0.0.jar;C:\Users\EasyPro.m2\repository\org\jboss\logging\jboss-logging\3.4.3.Final\jboss-logging-3.4.3.Final.jar;C:\Users\EasyPro.m2\repository\org\hibernate\common\hibernate-commons-annotations\6.0.2.Final\hibernate-commons-annotations-6.0.2.Final.jar;C:\Users\EasyPro.m2\repository\org\jboss\jandex\2.4.2.Final\jandex-2.4.2.Final.jar;C:\Users\EasyPro.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;C:\Users\EasyPro.m2\repository\net\bytebuddy\byte-buddy\1.12.9\byte-buddy-1.12.9.jar;C:\Users\EasyPro.m2\repository\jakarta\xml\bind\jakarta.xml.bind-api\3.0.1\jakarta.xml.bind-api-3.0.1.jar;C:\Users\EasyPro.m2\repository\com\sun\activation\jakarta.activation\2.0.1\jakarta.activation-2.0.1.jar;C:\Users\EasyPro.m2\repository\org\glassfish\jaxb\jaxb-runtime\3.0.2\jaxb-runtime-3.0.2.jar;C:\Users\EasyPro.m2\repository\org\glassfish\jaxb\jaxb-core\3.0.2\jaxb-core-3.0.2.jar;C:\Users\EasyPro.m2\repository\org\glassfish\jaxb\txw2\3.0.2\txw2-3.0.2.jar;C:\Users\EasyPro.m2\repository\com\sun\istack\istack-commons-runtime\4.0.1\istack-commons-runtime-4.0.1.jar;C:\Users\EasyPro.m2\repository\jakarta\inject\jakarta.inject-api\2.0.0\jakarta.inject-api-2.0.0.jar;C:\Users\EasyPro.m2\repository\org\antlr\antlr4-runtime\4.10\antlr4-runtime-4.10.jar;C:\Users\EasyPro.m2\repository\mysql\mysql-connector-java\8.0.29\mysql-connector-java-8.0.29.jar;C:\Users\EasyPro.m2\repository\com\google\protobuf\protobuf-java\3.19.4\protobuf-java-3.19.4.jar;C:\Users\EasyPro.m2\repository\jakarta\persistence\jakarta.persistence-api\2.2.3\jakarta.persistence-api-2.2.3.jar" br.com.lusardo.loja.testes.CadastroDeProduto jun 21, 2022 1:42:39 PM javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver log ADVERTÊNCIA: javax.persistence.spi::No valid providers found. Exception in thread "main" java.lang.ExceptionInInitializerError at br.com.lusardo.loja.testes.CadastroDeProduto.main(CadastroDeProduto.java:18) Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named loja at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:86) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55) at br.com.lusardo.loja.util.JPAUtil.(JPAUtil.java:9) ... 1 more
Process finished with exit code 1
meu persistence.xml está assim:
<persistence-unit name="loja">...
Podem me dar uma ajuda por favor????