Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.4.1
-
Fix Version/s: None
-
Component/s: Engine - Provenance
-
Labels:None
Description
Reported by Markus Plangg to taverna-users on 2012-01-11.
If a nested workflow is included twice in the same workflow (ie. both nested workflows have the same workflow ID) - then executing provenance will log an exception due to a duplicate database key.
See console log from running the attached workflow:
ERROR 2012-01-11 15:07:47,958 (net.sf.taverna.t2.provenance.lineageservice.EventProcessor:515) - Problem processing provenance for dataflow
java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL111214160422260' defined on 'WORKFLOWRUN'.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at net.sf.taverna.t2.provenance.lineageservice.ProvenanceWriter.addWorkflowRun(ProvenanceWriter.java:274)
at net.sf.taverna.t2.provenance.lineageservice.EventProcessor.processDataflowStructure(EventProcessor.java:302)
at net.sf.taverna.t2.provenance.lineageservice.EventProcessor.processDataflowStructure(EventProcessor.java:394)
at net.sf.taverna.t2.provenance.lineageservice.EventProcessor.processWorkflowStructure(EventProcessor.java:221)
at net.sf.taverna.t2.provenance.lineageservice.EventProcessor.processWorkflowStructure(EventProcessor.java:184)
at net.sf.taverna.t2.provenance.lineageservice.Provenance.processEvent(Provenance.java:187)
at net.sf.taverna.t2.provenance.lineageservice.Provenance.acceptRawProvenanceEvent(Provenance.java:141)
at net.sf.taverna.t2.provenance.connector.ProvenanceConnector.addProvenanceItem(ProvenanceConnector.java:359)
at net.sf.taverna.t2.facade.impl.WorkflowInstanceFacadeImpl.fire(WorkflowInstanceFacadeImpl.java:239)
at net.sf.taverna.t2.workbench.run.WorkflowRun.run(WorkflowRun.java:282)
at net.sf.taverna.t2.workbench.run.ResultsPerspectiveComponent.runWorkflow(ResultsPerspectiveComponent.java:501)
at net.sf.taverna.t2.workbench.run.actions.RunWorkflowAction$2.run(RunWorkflowAction.java:243)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:641)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:611)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.sql.SQLException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL111214160422260' defined on 'WORKFLOWRUN'.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 37 more
Caused by: ERROR 23505: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL111214160422260' defined on 'WORKFLOWRUN'.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(Unknown Source)
at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(Unknown Source)
at org.apache.derby.impl.sql.execute.IndexChanger.insert(Unknown Source)
at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(Unknown Source)
at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown Source)
at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
... 31 more
However this does not seem to cause any troubles with provenance, both in the workbench, OPM and Janus export works as normal, differentiating between activities in the two equivalent nested workflows.
This log message can therefore be ignored. However, when running on the command line, this log message might give the false impression that provenance is not being captured.