上传ZIP文件,Hibernate报错

m1475a 2015-04-26 12:36:08
问题描述:最近在学JBPM,在页面上传一个zip格式文件,利用 org.jbpm.api.NewDeployment.addResourcesFromZipInputStream(ZipInputStream arg0)这个方法解析的时候就会报错。我是跟着视频学的,我直接拷视频的源码也报错。我怀疑是编码问题,因为报错信息最下面出现乱码。可我所有地方项目工程和,JSP页面,数据库都统一为U8编码。这个问题卡我两天了!!求大神解救啊!!不甚感激!!!!!

JAVA代码:
zipInputStream = new ZipInputStream(new FileInputStream(zipFile));
processEngine.getRepositoryService() // processEngine是 org.jbpm.api.ProcessEngine
.createDeployment() // 这个方法是org.jbpm.api.RepositoryService.createDeployment,
.addResourcesFromZipInputStream(zipInputStream) // 这个是org.jbpm.api.NewDeployment.deploy 就在这里报错
.deploy();


报错信息:org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
Caused by: java.sql.BatchUpdateException: 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 '\0\0?E?E\0\0N?E\0\0N?E\0\0N?E\0\0N?E\0\0N?E\0\0N?E\0\0N?E\0\0N?E\0\0N?E\0\0N?E\0' at line 1
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1669)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1085)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
... 116 m

上传的文件:
<?xml version="1.0" encoding="UTF-8"?>

<process name="helloworld" xmlns="http://jbpm.org/4.4/jpdl">
<start g="108,12,48,48" name="start1">
<transition g="-71,-17" name="to 提交申请" to="提交申请"/>
</start>
<end g="107,346,48,48" name="end1"/>
<task g="73,94,117,52" name="提交申请" assignee="员工">
<transition g="-107,-17" name="to 部门经理[审批]" to="部门经理[审批]"/>
</task>
<task g="73,178,117,52" name="部门经理[审批]" assignee="部门经理">
<transition g="-95,-17" name="to 总经理[审批]" to="总经理[审批]"/>
</task>
<task g="73,262,117,52" name="总经理[审批]" assignee="总经理">
<transition g="-47,-17" name="to end1" to="end1"/>
</task>
</process>
还有一张PNG格式的图片
...全文
156 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
m1475a 2015-04-26
  • 打赏
  • 举报
回复
求解啊!!!

22,302

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧