jbpmhelper mysql_在jbpm中将定义好的流程打包后发布到 mysql 中时出错

在jbpm中将定义好的流程打包后发布到 mysql 中时,会出现如下错误,但是发布到hsqldb没有任何问题 希望得到各位的帮助。

00:04:01,976 [main] WARN JDBCExceptionReporter : SQL Error: 1064, SQLState: 42000

00:04:01,976 [main] ERROR JDBCExceptionReporter : Syntax error or access violation message from server: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?]笎c尗n?0kk&3M\0X(\0(\0(\0(\0(\0(\0(\0(\0(\0(\0(\0(' at line 1"

00:04:01,980 [main] ERROR DbPersistenceService : hibernate commit failed

org.hibernate.exception.SQLGrammarException: could not insert collection: [org.jbpm.bytes.ByteArray.byteBlocks#10]

at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)

at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)

at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1183)

at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26)

at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)

at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)

at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:143)

at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)

at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)

at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)

at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)

at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)

at org.jbpm.persistence.db.DbPersistenceService.commit(DbPersistenceService.java:256)

at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:214)

at org.jbpm.svc.Services.close(Services.java:225)

at org.jbpm.JbpmContext.close(JbpmContext.java:139)

at com.helloworld.JbpmTestToDB.main(JbpmTestToDB.java:27)

Caused by: java.sql.BatchUpdateException: Syntax error or access violation message from server: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?]笎c尗n?0kk&3M\0X(\0(\0(\0(\0(\0(\0(\0(\0(\0(\0(\0(' at line 1"

at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1492)

at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)

at org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:34)

at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1146)

... 14 more

00:04:02,015 [main] ERROR Services : problem closing service 'persistence'

org.jbpm.persistence.JbpmPersistenceException: hibernate commit failed

at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:219)

at org.jbpm.svc.Services.close(Services.java:225)

at org.jbpm.JbpmContext.close(JbpmContext.java:139)

at com.helloworld.JbpmTestToDB.main(JbpmTestToDB.java:27)

Caused by: org.hibernate.exception.SQLGrammarException: could not insert collection: [org.jbpm.bytes.ByteArray.byteBlocks#10]

at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)

at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)

at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1183)

at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26)

at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)

at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)

at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:143)

at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)

at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)

at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)

at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)

at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)

at org.jbpm.persistence.db.DbPersistenceService.commit(DbPersistenceService.java:256)

at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:214)

... 3 more

Caused by: java.sql.BatchUpdateException: Syntax error or access violation message from server: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?]笎c尗n?0kk&3M\0X(\0(\0(\0(\0(\0(\0(\0(\0(\0(\0(\0(' at line 1"

at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1492)

at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)

at org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:34)

at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1146)

... 14 more

代码如下:

JbpmConfiguration configuration = JbpmConfiguration.getInstance();

JbpmContext context = configuration.createJbpmContext();

String fileString = "F:\\helloworld.zip";

try {

FileInputStream in = new FileInputStream(new File(fileString));

ZipInputStream z = new ZipInputStream(in);

ProcessDefinition definition = ProcessDefinition.parseParZipInputStream(z);

context.deployProcessDefinition(definition);

z.close();

in.close();

} catch (Exception e) {

// TODO: handle exception

}

finally{

context.close();

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值