mysql新驱动引发的异常

org.activiti.engine.ActivitiException: couldn't check if tables are already present using metadata:

### Error getting a new connection. 

Cause: java.sql.SQLException: 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

mysql使用mysql-connector-java 6.0.3/6.0.4 运行程序报异常

The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone.

原因:

数据库和系统时区差异造成

解决办法:

在jdbc连接的url后面加上serverTimezone=GMT或者UTC参数即可。

eg:

<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/activiti?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT
"/>

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc阅读 7,946评论 0 0
  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 13,469评论 0 23
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,461评论 19 139
  • 这是我的第一篇文章,一直想要写,却迟迟没有下笔。我想倘若一直这样停滞,永远也实现不了自己想要写作的梦想。 想要写字...
    queir阅读 3,169评论 0 0
  • 在国庆中秋举国同庆,有人堵在路上,心里满满归家喜悦,国庆周末没有正常的休息,还在上班,堵在心里的愤懑,错过同学30...
    熊芳菲阅读 7,182评论 1 1