Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Getting org.eclipse.core.runtime.AssertionFailedException Wh

I may not be doing this the right way, but I am getting the following
xception when trying to move an existing workitem into the "In Progress"
state. Why am I getting this exception? Thanks.

Sample code:

.....................................

IWorkItemClient workItemClient = (IWorkItemClient)
repo.getClientLibrary(IWorkItemClient.class);

IAuditableClient iAuditableClient = (IAuditableClient)
repo.getClientLibrary(IAuditableClient.class);

IWorkItem workItem = workItemClient.findWorkItemById(defectId,
IWorkItem.DEFAULT_PROFILE, null);

System.out.println("**********************" + workItem.getId());
System.out.println("**********************" +
workItem.getHTMLSummary().toString());

CommonWorkItemOperation operation = new CommonWorkItemOperation(null,
transaction, getParameterFlags(), repo, area, workItemClient,
iAuditableClient);

operation.run(workItem, null); -------------------------->
line where exception is thrown


........................

WorkItemOperation class execute(..) method:

protected void execute(WorkItemWorkingCopy workingCopy, IProgressMonitor
monitor) throws TeamRepositoryException {

try {
updateWorkItem(transaction, artifactFlags, workingCopy.getWorkItem(),
repo, area, workItemClient, iAuditableClient);

if (getApiName() != null || getApiName().length() > 0) {
workingCopy.setWorkflowAction(getApiName());
}

IStatus status = workingCopy.save(monitor);

if (status.getSeverity() == IStatus.CANCEL || status.getSeverity() ==
IStatus.ERROR) {
throw new TeamRepositoryException(repo, status.getMessage(),
status.getException());
} else {
transaction.set(ConfigurationMapper.PARAM_CDERESOURCEKEY, new
Integer(workingCopy.getWorkItem().getId()));
}
} catch (TeamRepositoryException e) {
e.printStackTrace();
throw e;
} catch (Exception e) {
e.printStackTrace();
throw new TeamRepositoryException(e);
}
}


Output:

**********************4179
**********************update Driver6 prog guide
org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:84)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:72)
at
com.ibm.team.workitem.client.WorkItemOperation.run(WorkItemOperation.java:91)
at
com.ibm.team.workitem.client.WorkItemOperation.run(WorkItemOperation.java:85)
at com.ibm.cde.jazz.actions.ActionCommon.execute(ActionCommon.java:110)
at com.ibm.cde.actions.AbstractAction.run(AbstractAction.java:250)
at
com.ibm.cde.bridge.ActionTransactionPair.run(ActionTransactionPair.java:167)


--
Sincerely,

Ahmed Hadad

0 votes



2 answers

Permanent link
Is there more detailed information needed to analyze this problem?

--
Sincerely,

Ahmed Hadad

"Ahmed Hadad (IBM)" <ahadad> wrote in message
news:g435ua$17b$1@localhost.localdomain...
I may not be doing this the right way, but I am getting the following
xception when trying to move an existing workitem into the "In Progress"
state. Why am I getting this exception? Thanks.

Sample code:

....................................

IWorkItemClient workItemClient = (IWorkItemClient)
repo.getClientLibrary(IWorkItemClient.class);

IAuditableClient iAuditableClient = (IAuditableClient)
repo.getClientLibrary(IAuditableClient.class);

IWorkItem workItem = workItemClient.findWorkItemById(defectId,
IWorkItem.DEFAULT_PROFILE, null);

System.out.println("**********************" + workItem.getId());
System.out.println("**********************" +
workItem.getHTMLSummary().toString());

CommonWorkItemOperation operation = new CommonWorkItemOperation(null,
transaction, getParameterFlags(), repo, area, workItemClient,
iAuditableClient);

operation.run(workItem,
--------------------------> line where exception is thrown


.......................

WorkItemOperation class execute(..) method:

protected void execute(WorkItemWorkingCopy workingCopy, IProgressMonitor
monitor) throws TeamRepositoryException {

try {
updateWorkItem(transaction, artifactFlags, workingCopy.getWorkItem(),
repo, area, workItemClient, iAuditableClient);

if (getApiName() != null || getApiName().length() > 0) {
workingCopy.setWorkflowAction(getApiName());
}

IStatus status = workingCopy.save(monitor);

if (status.getSeverity() == IStatus.CANCEL || status.getSeverity() ==
IStatus.ERROR) {
throw new TeamRepositoryException(repo, status.getMessage(),
status.getException());
} else {
transaction.set(ConfigurationMapper.PARAM_CDERESOURCEKEY, new
Integer(workingCopy.getWorkItem().getId()));
}
} catch (TeamRepositoryException e) {
e.printStackTrace();
throw e;
} catch (Exception e) {
e.printStackTrace();
throw new TeamRepositoryException(e);
}
}


Output:

**********************4179
**********************update Driver6 prog guide
org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:84)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:72)
at
com.ibm.team.workitem.client.WorkItemOperation.run(WorkItemOperation.java:91)
at
com.ibm.team.workitem.client.WorkItemOperation.run(WorkItemOperation.java:85)
at com.ibm.cde.jazz.actions.ActionCommon.execute(ActionCommon.java:110)
at com.ibm.cde.actions.AbstractAction.run(AbstractAction.java:250)
at
com.ibm.cde.bridge.ActionTransactionPair.run(ActionTransactionPair.java:167)


--
Sincerely,

Ahmed Hadad

0 votes


Permanent link
The line numbers don't match with the latest source.

Here is my guess:

For those run methods that manipulate existing work items the
WorkItemOperation has to be created with a item profile. In your case
the item profile is null and you get the exception. You need to
instantiate the operation with the matching profile. Pls upgrade using
the latest source code version. This gives you access to the recently
added javadoc.

The work item team might have more details.

Kai
Jazz Process Team

Ahmed Hadad (IBM) wrote:
Is there more detailed information needed to analyze this problem?

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jun 27 '08, 12:53 p.m.

Question was seen: 10,790 times

Last updated: Jun 27 '08, 12:53 p.m.

Confirmation Cancel Confirm