activiti部署流程定义时出错

// 部署流程定义 Deployment deployment = deploymentBuilder.deploy();

错误信息:(有乱码的...没留下截图...)

 SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/developing/eclipse/workspace/ProjectManagement/projectManagement/src/main/webapp/WEB-INF/lib/slf4j-log4j12-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Administrator/.m2/repository/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
[org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [spring-activiti.xml]
[org.springframework.context.support.GenericApplicationContext] - Refreshing org.springframework.context.support.GenericApplicationContext@6b09bb57: startup date [Thu Feb 23 13:33:02 CST 2017]; root of context hierarchy
[org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
[org.activiti.engine.impl.ProcessEngineImpl] - ProcessEngine default created
[org.springframework.test.context.transaction.TransactionalTestExecutionListener] - Began transaction (1) for test context [DefaultTestContext@192d74fb testClass = BpmDefinitionTest, testInstance = org.projMgr.TestCase.BpmDefinitionTest@4bef0fe3, testMethod = deploymentProcessDefinition@BpmDefinitionTest, testException = [null], mergedContextConfiguration = [MergedContextConfiguration@62ea3440 testClass = BpmDefinitionTest, locations = '{classpath:spring-activiti.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]]; transaction manager [org.springframework.jdbc.datasource.DataSourceTransactionManager@27953a83]; rollback [false]
[org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [spring-activiti.xml]
[org.activiti.engine.impl.ProcessEngineImpl] - ProcessEngine default created
[org.activiti.engine.impl.bpmn.deployer.BpmnDeployer] - Processing resource org/projMgr/TestCase/MyProcess.png
[org.activiti.engine.impl.bpmn.deployer.BpmnDeployer] - Processing resource org/projMgr/TestCase/MyProcess.bpmn
[org.activiti.engine.impl.interceptor.CommandContext] - Error while closing command context
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.sql.SQLException: Column count doesn't match value count at row 1
### The error may involve org.activiti.engine.impl.persistence.entity.ResourceEntity.bulkInsertResource-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_, GENERATED_) VALUES (?, 1, ?, ?, ?, ?) , (?, 1, ?, ?, ?, ?)
### Cause: java.sql.SQLException: Column count doesn't match value count at row 1
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:172)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:157)
at org.activiti.engine.impl.db.DbSqlSession.flushBulkInsert(DbSqlSession.java:847)
at org.activiti.engine.impl.db.DbSqlSession.flushPersistentObjects(DbSqlSession.java:817)
at org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:794)
at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:615)
at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:212)
at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:138)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:66)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:79)
at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:156)
at org.projMgr.TestCase.BpmDefinitionTest.deploymentProcessDefinition(BpmDefinitionTest.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.sql.SQLException: Column count doesn't match value count at row 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1307)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:45)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:73)
at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:49)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:115)
at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:170)
... 42 more
[org.springframework.test.context.transaction.TransactionalTestExecutionListener] - Committed transaction after test execution for test context [DefaultTestContext@192d74fb testClass = BpmDefinitionTest, testInstance = org.projMgr.TestCase.BpmDefinitionTest@4bef0fe3, testMethod = deploymentProcessDefinition@BpmDefinitionTest, testException = org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.sql.SQLException: Column count doesn't match value count at row 1
### The error may involve org.activiti.engine.impl.persistence.entity.ResourceEntity.bulkInsertResource-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_, GENERATED_) VALUES (?, 1, ?, ?, ?, ?) , (?, 1, ?, ?, ?, ?)
### Cause: java.sql.SQLException: Column count doesn't match value count at row 1, mergedContextConfiguration = [MergedContextConfiguration@62ea3440 testClass = BpmDefinitionTest, locations = '{classpath:spring-activiti.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]]
[org.springframework.test.context.transaction.TransactionalTestExecutionListener] - Began transaction (2) for test context [DefaultTestContext@192d74fb testClass = BpmDefinitionTest, testInstance = org.projMgr.TestCase.BpmDefinitionTest@733c423e, testMethod = test@BaseTestCase, testException = [null], mergedContextConfiguration = [MergedContextConfiguration@62ea3440 testClass = BpmDefinitionTest, locations = '{classpath:spring-activiti.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]]; transaction manager [org.springframework.jdbc.datasource.DataSourceTransactionManager@27953a83]; rollback [false]
通导test
[org.springframework.test.context.transaction.TransactionalTestExecutionListener] - Committed transaction after test execution for test context [DefaultTestContext@192d74fb testClass = BpmDefinitionTest, testInstance = org.projMgr.TestCase.BpmDefinitionTest@733c423e, testMethod = test@BaseTestCase, testException = [null], mergedContextConfiguration = [MergedContextConfiguration@62ea3440 testClass = BpmDefinitionTest, locations = '{classpath:spring-activiti.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]]
[org.springframework.context.support.GenericApplicationContext] - Closing org.springframework.context.support.GenericApplicationContext@6b09bb57: startup date [Thu Feb 23 13:33:02 CST 2017]; root of context hierarchy

主要是

### SQL: INSERT INTO ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_, GENERATED_) VALUES (?, 1, ?, ?, ?, ?) , (?, 1, ?, ?, ?, ?) 

### Cause: java.sql.SQLException: Column count doesn't match value count at row 1

网上查询后,认为是数据库编码的问题。

查询后发现character_set_server编码是GBK,修改为gb2312后解决问题

查看、修改数据库(MySQL)编码参考:

http://www.2cto.com/database/201310/248493.html

MySQL数据库出现中文乱码的原因,往往是以下以下客户端、服务器、结果集、数据库的字符集不统一造成的,可以通过:

show variables like "%char%";

语句查询自己数据库当前字符集的配置。

对于数据库字符集,可以通过这个命令更改:

ALTER DATABASE `db_name` CHARACTER SET utf8;

其他的也可以通过这条语句修改:

set character_set_client='utf8';

但是,character_set_server如果默认为latin1,要永久更改,用set命令是行不通的,而更改my.ini文件,也没有效果。

正解是:

在MySQL的安装文件中进入bin目录下,双击MySQLInstanceConfig.exe,重新走一遍server的配置,但需要注意的是,在Character Set环节,要选择第三项,character选择gb2312,(第一项是默认server字符集为latin1)。

修改后查询编码:

activiti流程部署启动:

activiti部署流程定义时出错:INSERT INTO ACT_GE_BYTEARRAY,修改数据库编码的更多相关文章

  1. Activiti 部署流程定义及相关的表(classpath部署、zip部署)

    package com.mycom.processDefinition; import org.activiti.engine.ProcessEngine; import org.activiti.e ...

  2. activiti自定义流程之整合(四):整合自定义表单部署流程定义

    综合前几篇博文内容,我想在整合这一部分中应该会有很多模块会跳过不讲,就如自定义表单的表单列表那一块,因为这些模块在整合的过程中都几乎没有什么改动,再多讲也是重复无用功. 正因为如此,在创建了流程模型之 ...

  3. activiti自定义流程之Spring整合activiti-modeler5.16实例(四):部署流程定义

    注:(1)环境搭建:activiti自定义流程之Spring整合activiti-modeler5.16实例(一):环境搭建        (2)创建流程模型:activiti自定义流程之Spring ...

  4. activiti自己定义流程之整合(四):整合自己定义表单部署流程定义

    综合前几篇博文内容.我想在整合这一部分中应该会有非常多模块会跳过不讲,就如自己定义表单的表单列表那一块,由于这些模块在整合的过程中都差点儿没有什么修改,再多讲也是反复无用功. 正由于如此,在创建了流程 ...

  5. activiti自己定义流程之Spring整合activiti-modeler5.16实例(四):部署流程定义

    注:(1)环境搭建:activiti自己定义流程之Spring整合activiti-modeler5.16实例(一):环境搭建         (2)创建流程模型:activiti自己定义流程之Spr ...

  6. activiti基础--1------------------------生成.bpmn和.png以及部署流程定义

    helloworld.dbmn <?xml version="1.0" encoding="UTF-8"?> <definitions xml ...

  7. (四)Activiti之流程定义部署之ZIP方式和流程定义查询

    一.流程定义部署之ZIP方式 上一章节我们使用classpath的方式加载流程定义文件,这里我们使用ZIP的方式. 1.1 用activiti插件生成bpmn和png图片之后,压缩到一个zip格式的压 ...

  8. 深入了解Activiti工作流流程定义

    深入了解Activiti工作流流程定义 2016-03-27| 发布: | 浏览: 2363 |保存PDF 部署流程定义 部署流程定义的流程: 1. 先获取流程引擎对象:在创建时会自动加载 class ...

  9. Activiti 删除流程定义

    package com.mycom.processDefinition; import java.io.InputStream; import java.util.List; import java. ...

随机推荐

  1. 数据结构和算法with Python

    http://www.math.pku.edu.cn/teachers/qiuzy/ds_python/courseware/index.htm

  2. jenkins 异常

    八月 03, 2017 7:23:54 下午 org.eclipse.jetty.util.log.JavaUtilLog warn 警告: FAILED ServerConnector@29e6eb ...

  3. maven springMVC SSM框架中 出现的406 (Not Acceptable)

    首先,需要清楚,http state 406代表什么意思: 406是HTTP协议状态码的一种,表示无法使用请求的特性来响应请求的网页.一般指客户端浏览器不接受所请求页面的MIME类型. 出现这样的错误 ...

  4. 深入理解char * ,char ** ,char a[ ] ,char *a[]

    1.数组的本质 数组是多个元素的集合,在内存中分布在地址相连的单元中,所以可以通过其下标访问不同单元的元素. 2.指针 指针也是一种变量,只不过它的内存单元中保存的是一个标识其他位置的地址.由于地址也 ...

  5. string截取、替换、查找子串函数,find_first_of 用法

    1. 截取子串 s.substr(pos, n) 截取s中从pos开始(包括0)的n个字符的子串,并返回 s.substr(pos) 截取s中从从pos开始(包括0)到末尾的所有字符的子串,并返回 2 ...

  6. 七牛云存储上传自有证书开启https访问

    虽然七牛云存储也提供免费SSL证书申请,但我就喜欢用其他平台申请的,于是在腾讯云申请了免费SSL证书,正准备在七牛上传,弹出的界面却让我傻了眼,如下图所示: 腾讯免费SSL证书提供了不同服务器环境的版 ...

  7. Abode Audition 的使用

    讲一下音频的合并,音量放大,音频截取,音频删除等. 我下载的是Abode Audition 3.0的试用版本,可以免费使用30天. 1. 将抖音中小视频保存下来,成为mp4文件,然而Audition ...

  8. Qt532.【转】Qt在pro中设置运行时库MT、MTd、MD、MDd,只适合VS版本的Qt

    ZC:具体应该设置 什么参数,可以参看 自己转载的文章:"VC.[转]采用_beginthread__beginthreadex函数创建多线程 - CppSkill - 博客园.html&q ...

  9. kubernetes 简介:kube-dns 和服务发现

    服务发现 kubernetes 提供了 service 的概念可以通过 VIP 访问 pod 提供的服务,但是在使用的时候还有一个问题:怎么知道某个应用的 VIP?比如我们有两个应用,一个 app,一 ...

  10. 获取 ip ( 第三方接口 )

    搜狐IP地址查询接口(默认GBK):http://pv.sohu.com/cityjson 搜狐IP地址查询接口(可设置编码):http://pv.sohu.com/cityjson?ie=utf-8 ...