关于osworkflow的数据库外键约束问题!help

07-12-13 bbxyhaihua
osworkflow自带的例子运行是能登陆进去,但是到这一步

Requeue Editing和Peer Review 时就报错了.sql是osworkflow 自身带的,请高人指点. 谢谢,,,,,,

com.opensymphony.workflow.StoreException: Unable to create current step for workflow instance #30: root cause: Cannot add or update a child row: a foreign key constraint fails (`osworkflowdb`.`os_currentstep`, CONSTRAINT `os_currentstep_ibfk_2` FOREIGN KEY (`OWNER`) REFERENCES `os_user` (`USERNAME`))

com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore.createCurrentStep(JDBCWorkflowStore.java:166)

com.opensymphony.workflow.AbstractWorkflow.createNewCurrentStep(AbstractWorkflow.java:1509)

com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1256)

com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:567)

org.apache.jsp.test_jsp._jspService(test_jsp.java:63)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`osworkflowdb`.`os_currentstep`, CONSTRAINT `os_currentstep_ibfk_2` FOREIGN KEY (`OWNER`) REFERENCES `os_user` (`USERNAME`))

com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)

com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)

com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)

com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)

com.mysql.jdbc.Connection.execSQL(Connection.java:3256)

com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)

com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1585)

com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1500)

com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1485)

org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)

com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore.createCurrentStep(JDBCWorkflowStore.java:833)

com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore.createCurrentStep(JDBCWorkflowStore.java:161)

com.opensymphony.workflow.AbstractWorkflow.createNewCurrentStep(AbstractWorkflow.java:1509)

com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1256)

com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:567)

org.apache.jsp.test_jsp._jspService(test_jsp.java:63)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

1
bbxyhaihua
2007-12-14 13:04
我试了请假审批工作流程,也是同样的错误,搞不清楚什么原因!

请大家指点

猜你喜欢