请教:jbpm运行中的问题:

运行带有JBPM的WEB应用,报错如下:
javax.servlet.ServletException: org.jbpm.persistence.JbpmPersistenceException: couldn't assign id to TaskInstance[AddExpenceAccount]
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.workflow.servlet.ChinaFilter.doFilter(ChinaFilter.java:23)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause:
java.sql.SQLException: Field 'VERSION_' doesn't have a default value

这个可能什么原因啊?新手请教
[b]问题补充:[/b]
thank you very much ,i am tesing with your method.

2个回答

数据库字段有问题。可能你的sql建表没有设置默认值,但是插入时候也没有赋值。

在mysql的严格模式下可能就会出这样的错误。

MySQL 5 uses a strict mode which needs to be disabled.
In Windows, Goto Start-->Programs-->MySQL->MySQL Instance Config Wizard. Follow through the Reconfigure Instance option-->Detailed Configuration-->Continue Next a few screens. At the bottom under Enable TCP/IP option there is 'Enable Strict Mode'. Deslect this option (no tick). Save changes and MySQL will restart.

你也可以试试,删除数据表再重新建一下。

不知道你的id是怎么设置的,也可以试试设置成自增的字段看看。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问