Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

Erro ao executar TesteConta

Alguém poderia me ajudar com o seguinte erro?

mai 24, 2018 10:27:45 AM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
INFO: HHH000204: Processing PersistenceUnitInfo [
    name: financas
    ...]
mai 24, 2018 10:27:46 AM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.3.0.Final}
mai 24, 2018 10:27:46 AM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
mai 24, 2018 10:27:46 AM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {5.0.3.Final}
mai 24, 2018 10:27:46 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
mai 24, 2018 10:27:46 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost/financas]
mai 24, 2018 10:27:46 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {user=root, password=****}
mai 24, 2018 10:27:46 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
mai 24, 2018 10:27:46 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections <init>
INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
Thu May 24 10:27:47 BRT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
mai 24, 2018 10:27:47 AM org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator initiateService
WARN: HHH000342: Could not obtain connection to query metadata : null
mai 24, 2018 10:27:47 AM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
mai 24, 2018 10:27:47 AM org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl makeLobCreatorBuilder
INFO: HHH000422: Disabling contextual LOB creation as connection was null
mai 24, 2018 10:27:47 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: 0, SQLState: 01S00
mai 24, 2018 10:27:47 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: The server time zone value 'Hora oficial do Brasil' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named financas
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:85)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
    at br.com.caelum.financas.teste.TesteConta.main(TesteConta.java:19)
2 respostas
solução!

Pessoal, Consegui resolver o problema!!! Lá vai a solução

1º - Trocar com.mysql.jdbc.Driver para com.mysql.cj.jdbc.Driver

2º - Trocar o valor do ...jdbc.url para jdbc:mysql://localhost/financas?useSSL=false&useTimezone=true&serverTimezone=UTC

Fala Luan, legal que solucionou! Estou marcando sua resposta acima como solução.

Abraço!