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
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
2 answers
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...
--
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
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:
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?