com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: The server time zone value '�й���׼

原创 2017年05月04日 18:00:11
com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: The server time zone value '�й���׼ʱ��' 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.
	sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	com.mysql.cj.core.exceptions.ExceptionFactory.createException(ExceptionFactory.java:54)
	com.mysql.cj.core.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73)
	com.mysql.cj.jdbc.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:118)
	com.mysql.cj.mysqla.MysqlaSession.configureTimezone(MysqlaSession.java:308)
	com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:2474)
	com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:1817)
	com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:1673)
	com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:656)
	com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:349)
	com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:221)
	org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
	org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
	org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
	org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
	org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
	org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
	org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
	org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:225)
	com.sun.proxy.$Proxy17.getMetaData(Unknown Source)
	org.activiti.engine.impl.db.DbSqlSession.isTablePresent(DbSqlSession.java:1113)
	org.activiti.engine.impl.db.DbSqlSession.isEngineTablePresent(DbSqlSession.java:1094)
	org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:1027)
	org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1422)
	org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:27)
	org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
	org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
	org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
	org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
	org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
	org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
	org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
	org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:80)
	org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:613)
	org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:65)
	org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:60)
	org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)
	org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
	org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
	org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1634)
	org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
	org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
	org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
	org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
	org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
	javax.servlet.GenericServlet.init(GenericServlet.java:158)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:745)

使用的是

<dependency>        	
	<groupId>mysql</groupId>        	
	<artifactId>mysql-connector-java</artifactId>        	
	<version>6.0.6</version>        
</dependency>

替换成:

<dependency>
	<groupId>mysql</groupId>
	<artifactId>mysql-connector-java</artifactId>
	<version>5.1.42</version>
</dependency>

版权声明:本文为博主原创文章,未经博主允许不得转载。

com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: The server time zone value '�й���׼

解决方案: 为URL添加参数:jdbc:mysql://localhost:3306/sys?useUnicode=true&characterEncoding=UTF-8&useJDBCCompl...

解决mysql java.sql.SQLException: The server time zone value‘XXXXXX' is unrecognized or represents...

个人错误总结解决java.sql.SQLException: The server time zone value ‘XXXXXX’ is unrecognized or represents mor...

abercrombie paris Now what measures to protect the languages � f the world have it

language and gradually lost because they can not communicate, there is no practical significance; st...

Copyright � 2012 As

Copyright � 2012 AsiaPoker77. permainan Poker Texas Holdem yang sangat terkenal dan terpercaya. Ma...

christian louboutin men and Deng Deng Jiaying expressed the hope that the idea of � oing his girl

but from the enormous suffering economy. After the accident,christian louboutin men, by the police, ...

HDU 4500 小Q系列故事――�丝的逆袭

毕业于普通本科的小Q一直自称是资深�丝,不仅学校不知名,甚至他自己在这个普通学校也是默默无闻――直到临近毕业的时候,班里5朵金花中的2位甚至从没和他说过话!   谁又能想到,如此不起眼的小Q在历经重...

mybatis报“com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL s”

做项目时mybatis报这个错 ### The error occurred while setting parameters ### Cause: com.mysql.jdbc.exceptions...

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

最近在项目上线测试阶段发现了一个问题,查看后台日志的时候经常出现一个WARN的信息,WARN 内容如下: [WARN ] 2016-04-21 12:58:36,509 method:co...

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 't.statis_date'

1、错误原因 [ERROR:]2015-04-18 13:20:31,883 [异常拦截] com.skycloud.oa.exception.ExceptionHandler org.hiberna...

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL

1、错误描述 org.hibernate.exception.SQLGrammarException: error executing work at org.hibernate.exception...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: The server time zone value '�й���׼
举报原因:
原因补充:

(最多只允许输入30个字)