It's all about the answers!

Ask a question

Delivering change set associated to a work item from one stream to another stream


Patria Lukman (2133) | asked May 16 '14, 4:31 p.m.
edited Oct 05 '17, 11:22 p.m. by David Lafreniere (4.8k7)

 hi all


I'm trying to deliver a change set that has already been to a stream to be delivered into another stream using RTC Plain Java Client Libraries version 4.0.3.

This is the use case:
Firstly , a group of files is associated to a change set, the change set is delivered to stream A and then associated to a work item.
Secondly, I want to be able to recover the associated change set to the work item and deliver it into stream B.
I'm able to recover the associated change set to the work item but haven't been able to deliver it into the second stream. 

Has anyone done this?

Thanks
Patria

Accepted answer


permanent link
Patria Lukman (2133) | answered May 22 '14, 10:29 a.m.
 hi all
hi all

I'm going to answer myself on this one: My problem was that the associated work item didn't have the following two attributes set:
Planned for and Owned by. That's why

java.lang.NullPointerException
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:200)
was being thrown.
Every change set linked to a work item needed to be associated to a specific iteration/sprint and an owner for tracking purposes.

David Lafreniere selected this answer as the correct answer

Comments
sam detweiler commented May 22 '14, 10:34 a.m.

are those required fields in your business process?


Ralph Schoon commented May 22 '14, 11:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

since these would typically trigger an advisor, they don't need to be set to required in the process, however if the operational behavior is configured to require them, you can get into trouble with automation. I would however expected to see some exception that makes more sense.

You could either check your work item prior to the deliver in the API, or make sure there the required attributes are set. I am not sure you can make sure that the quality goals are met by requiring them though.


sam detweiler commented May 22 '14, 12:10 p.m. | edited May 22 '14, 12:12 p.m.

Owner is required if you want to make the workitem in progress. 
I haven't seen planned for as required by default
neither should trigger any other advisor by default.

(there are plenty of places where errors aren't quite what they need to be.. I opened a defect against report resource deployment returning the wrong exception code, it was closed,but still wrong)).


Ralph Schoon commented May 22 '14, 12:23 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The Require Work Items and Comments deliver change set Server advisor can be set to require an ownerand being planned for (even the current iteration).

2 other answers



permanent link
Patria Lukman (2133) | answered May 16 '14, 4:34 p.m.
I have already read this posting, but it does not work for me, since I'm able to recover the change set handles from the work item but when delivering them I get an exception: "Deliver failed " 

any help is much appreciated!!


Comments
sam detweiler commented May 16 '14, 4:40 p.m.

can you get the stacktrace of the exception?


Karthik Krishnan commented May 17 '14, 1:57 a.m.

Do you have any operation behavior set for "Deliver" actions? I had similar probelm while setting up Distributed SCM. Only way I found was to adjust the operational behavior on both the RTC servers for specific role.


Both Delvier (server) and deliver (client)

In my case I wasn;t able to set the work item during "scm deliver" action


permanent link
Patria Lukman (2133) | answered May 20 '14, 10:53 p.m.
 java.lang.NullPointerException
at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:200)
at com.ibm.team.scm.common.internal.process.AdvisorDataMarshaller.getPackageAdmin(AdvisorDataMarshaller.java:385)
at com.ibm.team.scm.common.internal.process.AdvisorDataMarshaller.marshallInto(AdvisorDataMarshaller.java:286)
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:282)
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:1254)
at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.runAdvisors(OperationAdviceManager.java:913)
at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.advise(OperationAdviceManager.java:293)
at com.ibm.team.process.internal.client.ThinClientProcess.doAdvise(ThinClientProcess.java:570)
at com.ibm.team.process.internal.client.ThinClientProcess.adviseAndExecute(ThinClientProcess.java:522)
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:195)
at com.ibm.team.scm.common.process.RunnableAdvisableOperation.processExec(RunnableAdvisableOperation.java:176)
at com.ibm.team.scm.client.internal.WorkspaceConnection.deliver(WorkspaceConnection.java:2004)
at com.ibm.team.scm.client.internal.WorkspaceConnection.deliver(WorkspaceConnection.java:1794)
at com.bnc.rtc.foundation.service.SCMServiceImpl.deliverIntoAnotherStream(SCMServiceImpl.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:91)
at com.bnc.rtc.foundation.aspect.RTCConnectionAspect.connectToRTCRepository(RTCConnectionAspect.java:230)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy25.deliverIntoAnotherStream(Unknown Source)
at com.bnc.rtc.foundation.service.SCMServiceIntegrationITCase.migrateChangeSetToAnotherStream(SCMServiceIntegrationITCase.java:218)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

Your answer


Register or 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.