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

exception while running plain java api snippet 2

Hello,

when running the snippet 2 from plain java api I get the following exception:

Contacting https://localhost:9443/ccm/...
Connected
Transferred 27 B of 27 B.
Checking precondition: Descriptive Change Sets
27.04.2012 12:03:02 com.ibm.team.process.internal.common.InternalProcessCommon log
SCHWER: null
java.lang.NullPointerException
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:200)
at com.ibm.team.filesystem.common.util.AdvisorDataMarshaller.getPackageAdmin(AdvisorDataMarshaller.java:368)
at com.ibm.team.filesystem.common.util.AdvisorDataMarshaller.marshallInto(AdvisorDataMarshaller.java:278)
at com.ibm.team.filesystem.common.workitems.internal.process.RequireWorkItemProblemObject.deflateInto(RequireWorkItemProblemObject.java:234)
at com.ibm.team.filesystem.common.workitems.internal.process.RequireWorkItemProblemObject.deflate(RequireWorkItemProblemObject.java:193)
at com.ibm.team.filesystem.common.workitems.internal.process.RequireWorkItemAdvisor.createProblem(RequireWorkItemAdvisor.java:201)
at com.ibm.team.filesystem.common.workitems.internal.process.RequireWorkItemAdvisor.addProblem(RequireWorkItemAdvisor.java:254)
at com.ibm.team.filesystem.common.workitems.internal.process.RequireWorkItemAdvisor.addProblems(RequireWorkItemAdvisor.java:187)
at com.ibm.team.filesystem.common.workitems.internal.process.RequireWorkItemAdvisor.run(RequireWorkItemAdvisor.java:131)
at com.ibm.team.filesystem.client.workitems.internal.advisors.RequireWorkItemAdvisor.run(RequireWorkItemAdvisor.java:45)
at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.runAdvisor(OperationAdviceManager.java:1117)
at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.runAdvisors(OperationAdviceManager.java:805)
at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.advise(OperationAdviceManager.java:274)
at com.ibm.team.process.internal.common.util.AbstractProcess.doAdvise(AbstractProcess.java:177)
at com.ibm.team.process.internal.client.ClientProcess.doAdvise(ClientProcess.java:127)
at com.ibm.team.process.internal.client.ClientProcess.adviseAndExecute(ClientProcess.java:110)
at com.ibm.team.scm.client.internal.process.ProcessUtils$ClientProcessProxy.adviseAndExecute(ProcessUtils.java:62)
at com.ibm.team.scm.common.process.RunnableAdvisableOperation.processExec(RunnableAdvisableOperation.java:189)
at com.ibm.team.scm.common.process.RunnableAdvisableOperation.processExec(RunnableAdvisableOperation.java:170)
at com.ibm.team.scm.client.internal.WorkspaceConnection.deliver(WorkspaceConnection.java:1974)
at com.ibm.team.scm.client.internal.WorkspaceConnection.deliver(WorkspaceConnection.java:1764)
at snippets.Snippet2.addFilesToStream(Snippet2.java:100)
at snippets.Snippet2.main(Snippet2.java:48)
Unable to login: 'Deliver' failed.





I have RTC 3.012 running.
Thanx Steffen

0 votes



One answer

Permanent link
Hi Steffen,

when you closer look at the stack trace you will see hints like "RequireWorkItemAdvisor.java:131...". There is a policy (operation behavior) "descriptive changesets"...that means there must be a Workitem or Comment attached to a changeset. Add the following line to your Snippet2.java ...to add a comment "dummy comment"  to the changeset.

SCMPlatform.getWorkspaceManager(repo).setComment(cs1, "dummy comment", null);

Restart Snippet2 and it should work.

Thx Stefan

1 vote

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
× 10,940

Question asked: Apr 27 '12, 6:09 a.m.

Question was seen: 6,594 times

Last updated: Oct 29 '12, 8:18 a.m.

Confirmation Cancel Confirm