1
resposta

TesteConta sem sucesso

Inseri tudo conforme o que foi informado no video e estourou um erro, inseri o jdb de acordo com o que foi informado por outro guri no outro post, mas não objetive êxito. Segue o erro :


set 05, 2019 12:15:59 AM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
INFO: HHH000204: Processing PersistenceUnitInfo [name: financas]
set 05, 2019 12:15:59 AM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {[WORKING]}
Exception in thread "main" java.lang.NoClassDefFoundError: net/bytebuddy/NamingStrategy$SuffixingRandom$BaseNameResolver
    at org.hibernate.orm.core@5.4.4.Final/org.hibernate.cfg.Environment.buildBytecodeProvider(Environment.java:345)
    at org.hibernate.orm.core@5.4.4.Final/org.hibernate.cfg.Environment.buildBytecodeProvider(Environment.java:337)
    at org.hibernate.orm.core@5.4.4.Final/org.hibernate.cfg.Environment.<clinit>(Environment.java:230)
    at org.hibernate.orm.core@5.4.4.Final/org.hibernate.boot.registry.StandardServiceRegistryBuilder.<init>(StandardServiceRegistryBuilder.java:78)
    at org.hibernate.orm.core@5.4.4.Final/org.hibernate.boot.registry.StandardServiceRegistryBuilder.<init>(StandardServiceRegistryBuilder.java:67)
    at org.hibernate.orm.core@5.4.4.Final/org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:202)
    at org.hibernate.orm.core@5.4.4.Final/org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:174)
    at org.hibernate.orm.core@5.4.4.Final/org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:76)
    at org.hibernate.orm.core@5.4.4.Final/org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilder(HibernatePersistenceProvider.java:171)
    at org.hibernate.orm.core@5.4.4.Final/org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilderOrNull(HibernatePersistenceProvider.java:119)
    at org.hibernate.orm.core@5.4.4.Final/org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilderOrNull(HibernatePersistenceProvider.java:61)
    at org.hibernate.orm.core@5.4.4.Final/org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:50)
    at java.persistence@2.2/javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
    at java.persistence@2.2/javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
    at br.com.caelum.teste.TesteConta.main(TesteConta.java:19)
Caused by: java.lang.ClassNotFoundException: net.bytebuddy.NamingStrategy$SuffixingRandom$BaseNameResolver
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 15 more

1 resposta

Olá Gedan, tudo bem?

Então cara, posta o codigo do seu persistence.xml. E tbm posta o código da sua classe JPAUtil.

Eu acho q o nome q esta na JPAUtil pode nao ser o mesmo do persistence.xml, mas só da pra ter certeza vendo os 2 arquivos.

Abraços.