It's all about the answers!

Ask a question

How to eliminate "Deferred operation failed" error in on fworkspaceConnection.setFlowTable()?


Andrew Ciaz (495) | asked Mar 21 '19, 9:40 a.m.

 Hi all,

I am trying to modify existing flow table's flow node and its component through Java API as below:

flowTable.setComponentScopes(workspaceConnection.getResolvedWorkspace(),components);
and I set modified flow table in workspace via below
workspaceConnection.setFlowTable(flowTable, monitor);

But while setting flow table to workspace I am getting following error, does anyone getting this error before. Help me to eliminate this error.

com.ibm.team.repository.common.InternalRepositoryException: Deferred operation failed
at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeExceptions(MarshallerUtil.java:377)
at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeExceptions(MarshallerUtil.java:347)
at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeFault(MarshallerUtil.java:312)
at com.ibm.team.repository.transport.client.RemoteTeamService.constructExceptionFromFault(RemoteTeamService.java:717)
at com.ibm.team.repository.transport.client.RemoteTeamService.executeMethod(RemoteTeamService.java:560)
at com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:202)
at com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43)
at com.sun.proxy.$Proxy39.setWorkspaceFlows(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(ServiceInterfaceProxy.java:254)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:110)
at com.sun.proxy.$Proxy39.setWorkspaceFlows(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy$2.run(ScmServiceInterfaceProxy.java:170)
at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1355)
at com.ibm.team.repository.common.transport.CancelableCaller.call(CancelableCaller.java:79)
at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(TeamRepository.java:1350)
at com.ibm.team.scm.client.internal.ScmClientLibraryContext.callCancelableService(ScmClientLibraryContext.java:71)
at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy.invokeCancelableService(ScmServiceInterfaceProxy.java:166)
at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy.invoke(ScmServiceInterfaceProxy.java:94)
at com.sun.proxy.$Proxy39.setWorkspaceFlows(Unknown Source)
at com.ibm.team.scm.client.internal.FlowNodeConnection.setFlowTable(FlowNodeConnection.java:1713)
at com.ibm.team.scm.client.internal.FlowNodeConnection.setFlowTable(FlowNodeConnection.java:1669)
at com.fca.plugin.flowtarget.business.SetScopeComponentsForFlowTarget.setScopeComponents(SetScopeComponentsForFlowTarget.java:71)
at com.fca.plugin.flowtarget.jobhandler.SetScopeComponentJob.run(SetScopeComponentJob.java:80)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: com.ibm.team.repository.common.TeamRepositoryException: deferred save failed
... 32 more
Caused by: com.ibm.team.repository.common.InternalRepositoryException: CRJAZ0329E The database query could not be completed. Integrity constraint violation
SQL: INSERT INTO SCM.WORKSPACE_FLOWS(JZ_PARENT_ID, INTERNAL_ID, TARGET_WORKSPACE_ITEM_ID, FLAGS) values (?, ?, ?, ?)
SQL Exception #1
SQL Message: 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 'WORKSPACE_FLOWS_PK' defined on 'WORKSPACE_FLOWS'.
SQL State: 23505
Error Code: 20000

Class: com.ibm.team.repository.service.internal.dataaccess.write2.HelperRowGenerator$HelperRow
Item Handle: com.ibm.team.scm.common.internal.impl.WorkspaceImpl@755921ca (stateId: [UUID _4_mQ9kvdEem2DuEw1hRQsQ], itemId: [UUID _VriMAEGNEemOm8uacbmTcA], origin: <unset>, immutable: true) (contextId: [UUID _Dp6kMdwTEd2jUupDpQV1Rw], modified: 2019-03-21 19:03:19.615, workingCopy: false) (predecessor: <unset>) (name: PMBD Pilot Dev Workspace, stream: false, description: , time: 4, customContext: [UUID _p57xQODvEd2JvqtXLuqiiw], normalizedName: pmbd pilot dev workspace, readPermissionMode: 0)
... 32 more
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 'WORKSPACE_FLOWS_PK' defined on 'WORKSPACE_FLOWS'.
... 32 more


Comments
Andrew Ciaz commented Mar 22 '19, 4:32 a.m.

@Ralph Schoon, do you have any idea, if yes then please suggest solution 

Be the first one to answer this question!


Register or to post your answer.