Quantcast
Channel: GUJ - Tópicos com a tag hibernate
Viewing all articles
Browse latest Browse all 759

Erro de "The server time zone value 'unknown' is unrecognized or represents more than one time zone." Hibernate e JDBC

$
0
0

@Breno_Henrrique escreveu:

Boa tarde galera, sei que este tópico existe aos montes tanto no GUJ quando no StackOverFlow, mas mesmo com as respostas de ambos os sites não resolvem o meu problema. Eu tenho um projeto que tive esse problema e joguei o comando da seguinte forma:
jdbc:mysql://localhost:3306/estoque?useTimezone=true&serverTimezone=UTC e consegui resolver o erro, só que neste projeto usava apenas JDBC e Java, com o Hibernate tudo que eu tento não dá certo. Minha classe persistence.xml esta assim:

<persistence-unit name="produto" transaction-type="RESOURCE_LOCAL">

	<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>

	<class>model.Produto</class>

	<properties>
		<!-- Driver JDBC para conexão com o MySQL -->
		<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />

		<!-- Propriedades para conexão com o banco de dados -->
		<property name="javax.persistence.jdbc.url"	value="jdbc:mysql://localhost:3306/dbprodutos?useTimezone=true;serverTimezone=UTC" />
		<property name="javax.persistence.jdbc.user" value="root" />
		<property name="javax.persistence.jdbc.password" value="" />

		<!-- Configurações do Hibernate -->
		<property name="hibernate.dialect"
			value="org.hibernate.dialect.MySQL5Dialect" />
		<property name="hibernate.hbm2ddl.auto" value="update" />
	</properties>
</persistence-unit>

Mas independente do que faça o problema não é sanado, meu erro é o seguinte:

ERROR: The server time zone value 'unknown' 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.

já tentei resolver com os comandos:
?useTimezone=true&serverTimezone=UTC
e
?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
mas sem sucesso. Alguém já teve o mesmo problema.

Mensagens: 1

Participantes: 1

Ler tópico completo


Viewing all articles
Browse latest Browse all 759

Trending Articles


Girasoles para colorear


mayabang Quotes, Torpe Quotes, tanga Quotes


Tagalog Quotes About Crush – Tagalog Love Quotes


OFW quotes : Pinoy Tagalog Quotes


Long Distance Relationship Tagalog Love Quotes


Tagalog Quotes To Move on and More Love Love Love Quotes


5 Tagalog Relationship Rules


Best Crush Tagalog Quotes And Sayings 2017


Re:Mutton Pies (lleechef)


FORECLOSURE OF REAL ESTATE MORTGAGE


Sapos para colorear


tagalog love Quotes – Tiwala Quotes


Break up Quotes Tagalog Love Quote – Broken Hearted Quotes Tagalog


Patama Quotes : Tagalog Inspirational Quotes


Pamatay na Banat and Mga Patama Love Quotes


Tagalog Long Distance Relationship Love Quotes


BARKADA TAGALOG QUOTES


“BAHAY KUBO HUGOT”


Vimeo 10.7.0 by Vimeo.com, Inc.


Vimeo 10.7.1 by Vimeo.com, Inc.



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>