Exception while creating work item using client Java API
Hi All,
I am following this link to create work item using client java API.
I copied code under Plain-Java Client section. When I execute this class, It gives me below exception
com.ibm.team.repository.common.ItemNotFoundException: CRJAZ0215E The following record was not found in the database: com.ibm.team.workitem.common.internal.model.impl.WorkItemHandleImpl@24342434 (stateId: <unset>, itemId: [UUID _4ZUWoJQQEeWpSOBmN0ZPzQ], origin: com.ibm.team.repository.client.internal.TeamRepository@45144514, immutable: <unset>)
When I executed this code in debug mode I found that
WorkItemInitialization operation= new WorkItemInitialization(summary, category);
IWorkItemHandle handle= operation.run(workItemType, null);
IWorkItem workItem= auditableClient.resolveAuditable(handle, IWorkItem.FULL_PROFILE, null);
handle reference was not found in database and exception is thrown at last line in above code snippet.
How can I resolve this error?
Thank You
|
One answer
Ralph Schoon (63.1k●3●36●46)
| answered Nov 27 '15, 5:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I have used code based on that example many times now. This kind of code works for me. I have published WorkItemOperation based automation examples on https://rsjazz.wordpress.com/. I can not remember having seen this error. Usually there is more information. Anyway, you can try to
Comments
vikrant kamble
commented Nov 30 '15, 5:51 a.m.
It worked for me.
I downloaded package com.ibm.team.workitem.ide.ui.example given on this link. Imported this package into my RTC eclipse and executed "CreateWorkItem.java". It worked for me without throwing any exception.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.