maven项目如下:

配置好数据库,和activiti的配置之后,开始执行流程部署

package com.yuanqiao.first_activiti.deployment;

import java.util.List;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.repository.Deployment;
import org.activiti.engine.repository.DeploymentBuilder;
import org.activiti.engine.repository.ProcessDefinition;
import org.junit.Test; import com.google.gson.Gson; /**
* 通过读取bpmn文件,来部署流程图
*
* @author yuanqiao
*
*/
public class DeploymentProcess { @Test
public void deploymentFirstProcess() {
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine(); RepositoryService repositoryService = processEngine.getRepositoryService(); DeploymentBuilder deploymentBuilder = repositoryService.createDeployment().addClasspathResource("first.bpmn"); Deployment deployment = deploymentBuilder.deploy();
String deploymentId = deployment.getId();
System.out.println(deploymentId);
List<ProcessDefinition> processDefinitionList = repositoryService.createProcessDefinitionQuery()
.deploymentId(deploymentId).list();
Gson gson = new Gson();
System.out.println(gson.toJson(processDefinitionList)); }
}

  

报错如下:

[main] ERROR org.activiti.engine.impl.interceptor.CommandContext - Error while closing command context
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table 'activiti.act_ge_property' doesn't exist
### The error may exist in org/activiti/db/mapping/entity/Property.xml
### The error may involve org.activiti.engine.impl.persistence.entity.PropertyEntityImpl.selectProperty-Inline
### The error occurred while setting parameters
### SQL: select * from ACT_GE_PROPERTY where NAME_ = ?
### Cause: java.sql.SQLSyntaxErrorException: Table 'activiti.act_ge_property' doesn't exist
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:77)
at org.activiti.engine.impl.db.DbSqlSession.selectById(DbSqlSession.java:364)
at org.activiti.engine.impl.db.DbSqlSession.selectById(DbSqlSession.java:348)
at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:910)
at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1318)
at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:28)
at org.activiti.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:37)
at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:78)
at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:57)
at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:42)
at org.activiti.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:48)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:63)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:29)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:44)
at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:81)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:665)
at org.activiti.engine.ProcessEngines.buildProcessEngine(ProcessEngines.java:189)
at org.activiti.engine.ProcessEngines.initProcessEngineFromResource(ProcessEngines.java:162)
at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:94)
at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:223)
at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:212)
at com.yuanqiao.first_activiti.deployment.DeploymentProcess.deploymentFirstProcess(DeploymentProcess.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

解决方法:

(1)把mysql8.0的版本改成5.0的

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

(2)修改驱动:

com.mysql.jdbc.Driver

参考文档
https://www.cnblogs.com/shanshen/p/9054173.html从源码分析问题:
https://blog.csdn.net/jiaoshaoping/article/details/80748065

  

Mysql8.0.17版本不能自动创建activiti表的坑的更多相关文章

  1. mysql8.0以上版本修改密码问题记录

    参考链接: https://blog.csdn.net/qq_27820551/article/details/101488430 https://blog.csdn.net/mukouping82/ ...

  2. mysql8.0.17复制搭建及其gtid的1062和1032异常

    mysql8.0.17复制搭建及其gtid的1062和1032异常 参考资料: https://blog.csdn.net/wzy0623/article/details/91982743https: ...

  3. MySQL8.0.17 - 初探 Clone Plugin

    MySQL8.0.17推出了一个重量级的功能:clone plugin.允许用户可以将当前实例进行本地或者远程的clone.这在某些场景尤其想快速搭建复制备份或者在group replication里 ...

  4. Navicat连接Mysql8.0.17出现1251错误 / 或者Navicat Premium出现2059错误

    Navicat连接Mysql8.0.17出现1251错误 重装了电脑之后,好多软件出了问题,经过一系列的插件安装,mysql终于安装好了 但是Navicat又抽筋了~~~额(⊙o⊙)... 在网上查的 ...

  5. SpringMVC+MyBatis+Druid使用MySQL8.0.11版本

    1.使用MySQL8.0.11版本,要使用5.1.45或其他高版本驱动jar包,我本地使用的是最新的8.0.11 2.更换了MySQL驱动后,报Cannot find class [com.aliba ...

  6. MYSQL8.0以上版本ROOT密码报错及修改

    在登录数据库过程中,如果遇到忘记root密码时,该如何解决? 1.使用管理员权限打开命令提示符,在命令行中输入: net stop mysql  2.待mysql服务停止后,输入: mysqld -- ...

  7. SpringBoot+Mybatis 自动创建数据表(适用mysql)

    Mybatis用了快两年了,在我手上的发展史大概是这样的 第一个阶段 利用Mybatis-Generator自动生成实体类.DAO接口和Mapping映射文件.那时候觉得这个特别好用,大概的过程是这样 ...

  8. A.CTable 自动创建数据表

    1.添加依赖 <!-- A.CTable 自动创建数据表 --> <dependency> <groupId>com.gitee.sunchenbin.mybati ...

  9. springboot项目启动-自动创建数据表

    很多时候,我们部署一个项目的时候,需要创建大量的数据表.例如mysql,一般的方法就是通过source命令完成数据表的移植,如:source /root/test.sql.如果我们需要一个项目启动后, ...

随机推荐

  1. PDB符号文件

    一.什么是PDB文件 PDB(Program DataBase),全称为“程序数据库”文件.存储程序的所有调试信息数据.在编译连接时,如果选择了/debug选项或/debug:full选项,则最新的M ...

  2. mysql 函数表

    Name Description ABS() Return the absolute value ACOS() Return the arc cosine ADDDATE() Add time val ...

  3. Vic-软件测试-开始软件测试

    前言 大家好,我是 Vic,今天给大家带来开始软件测试的概述,希望你们喜欢 软件测试 软件测试的基本概念.方法.常用测试工具的使用 常用测试工具的使用性能自动化测试工具:jmeter.loadrunn ...

  4. Subspace Subcode

    子码(subcode)的概念来自信息编码,不太容易理解.通常是子域编码(subfield subcode),也可以扩展到子空间编码(subspace subcode). 子空间或者子域编码的一个基本想 ...

  5. 安装pdo_dblib扩展连接SQLserver

    1.先得安装freetdswget ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.1.5.tar.gztar zxvf freetds-1.1. ...

  6. 常用命令备忘 xargs

    xargs 作为使用率很高的命令,但是长久不用就会模糊了记忆,所以要记录下来. 获取所有的cobbler相关的布尔值然后全部设置为真 getsebool -a|grep cobbler|awk '{p ...

  7. 高效率编辑器 Vim——操作篇,非常适合 Vim 新手

    原文地址:https://linuxtoy.org/archives/efficient-editing-with-vim.html vim教程:http://vimcasts.org/ https: ...

  8. BAT文件语法和技巧(bat文件的编写及使用)

    比较有用的东西 首先,批处理文件是一个文本文件,这个文件的每一行都是一条DOS命令(大部分时候就好象我们在DOS提示符下执行的命令行一样),你可以使用DOS下的Edit或者Windows的记事本(no ...

  9. 【2019.10.17】十天Web前端程序员体验(软件工程实践第五次作业)

    结对信息.具体分工 Github地址:https://github.com/MokouTyan/131700101-031702425 学号 昵称 主要负责内容 博客地址 131700101 莫多 代 ...

  10. Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks

    Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks 2019-06-01 09:52:4 ...