It's all about the answers!

Ask a question

Facing problem in streams comparision


Vinod Kumar (9612010) | asked May 03 '09, 10:57 p.m.
JAZZ DEVELOPER
I'm using WVCM API to compare 2 streams, both of these streams are Jazz Streams

ResponseIterator<CompareReport> compareList = stream1.doCompareReport(stream2, new CompareFlag[]{CompareFlag.ACTIVITIES, CompareFlag.NEW_ONLY}, feedback);

The ResponseIterator object I receive provides me the difference in version list as well as difference in activities.
The list of activities is basically the list of change sets. But when try to get the list of tasks from the activity, it is null, though there are work items associated with the change set
i.e. (AddedActivity) CompareReport)).getActivity().getTaskList() is null. Please let me what can be the problem and how it can be rectified?

I'm using RTC 2.0 beta

12 answers



permanent link
Geoffrey Clemm (30.1k33035) | answered May 08 '09, 12:54 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You need to specify in your "feedback" argument the information you want
returned back in the results of the compare. In particular, you'd need
to specify in the feedback argument that you want the Activity.TASK_LIST
to be returned.

Cheers,
Geoff

vkcind wrote:
I'm using WVCM API to compare 2 streams, both of these streams are
Jazz Streams

ResponseIterator<CompareReport> compareList =
stream1.doCompareReport(stream2, new
CompareFlag[]{CompareFlag.ACTIVITIES, CompareFlag.NEW_ONLY},
feedback);

The ResponseIterator object I receive provides me the difference in
version list as well as difference in activities.
The list of activities is basically the list of change sets. But when
try to get the list of tasks from the activity, it is null, though
there are work items associated with the change set
i.e. (AddedActivity) CompareReport)).getActivity().getTaskList() is
null. Please let me what can be the problem and how it can be
rectified?

I'm using RTC 2.0 beta

permanent link
Geoffrey Clemm (30.1k33035) | answered May 08 '09, 12:58 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
To be a bit more specific, you'd want to define a PropertyRequest object
such as:

private static final PropertyRequest PR_TASKS =
new PropertyRequest(Activity.TASK_LIST);

And then pass in "feedback.nest(PR_TASKS)" instead of just "feedback", i.e.:
ResponseIterator<CompareReport> compareList =
stream1.doCompareReport(stream2, new
CompareFlag[]{CompareFlag.ACTIVITIES, CompareFlag.NEW_ONLY},
feedback.nest(PR_TASKS));


Geoffrey Clemm wrote:
You need to specify in your "feedback" argument the information you want
returned back in the results of the compare. In particular, you'd need
to specify in the feedback argument that you want the Activity.TASK_LIST
to be returned.

Cheers,
Geoff

vkcind wrote:
I'm using WVCM API to compare 2 streams, both of these streams are
Jazz Streams

ResponseIterator<CompareReport> compareList =
stream1.doCompareReport(stream2, new
CompareFlag[]{CompareFlag.ACTIVITIES, CompareFlag.NEW_ONLY},
feedback);

The ResponseIterator object I receive provides me the difference in
version list as well as difference in activities.
The list of activities is basically the list of change sets. But when
try to get the list of tasks from the activity, it is null, though
there are work items associated with the change set
i.e. (AddedActivity) CompareReport)).getActivity().getTaskList() is
null. Please let me what can be the problem and how it can be
rectified?

I'm using RTC 2.0 beta

permanent link
Vinod Kumar (9612010) | answered May 12 '09, 6:29 a.m.
JAZZ DEVELOPER
Hi Geoff,
Thanks for the reply.
Actually the problem still remains same. I was already sending the feedback with the Activity.TASK_LIST and other information I needed. And moreover I'm not getting WvcmException, which should be the case if I try to retrieve the information, for which I did not request for.
I'm getting the Activity object but the activity.getTasks() is returning empty ArrayList.

permanent link
Vinod Kumar (9612010) | answered May 12 '09, 6:39 a.m.
JAZZ DEVELOPER
Also, I downloaded the RTC2.0 beta -1 JazzPlainJavaClient libraries and I'm trying the use it with my wizard plugin, which is used to create a stream by extracting the code from CMVC. For this stream I need to store some custom properties such CMVC release name etc. But when I call stream.doWriteProperties(), I'm getting the following exception, though the IInteropManager interface and class InteropManager are in the same jar which is available in the JazzPlainJavaClient libraries only.

javax.wvcm.WvcmException: Could not set property: com.ibm.team.connector.cmvc:CMVC_RELEASE_NAME
at com.ibm.rational.wvcm.ri.srvc.SrvcResource.doWriteProperties(SrvcResource.java:863)
at com.ibm.rational.wvcm.ri.srvc.WvcmService.writeProps(WvcmService.java:340)
at com.ibm.rational.wvcm.ri.srvc.WvcmService.doUpdateProperties(WvcmService.java:674)
at com.ibm.rational.wvcm.ri.impl.WvcmServiceConverter.doWriteProperties(WvcmServiceConverter.java:466)
at com.ibm.rational.wvcm.ri.impl.ResourceImpl.doWriteProperties(ResourceImpl.java:217)
at com.ibm.team.connector.scm.cmvc.ide.ui.wizards.CmvcImportWizard$1.run(CmvcImportWizard.java:240)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Caused by: java.lang.ClassCastException: com.ibm.team.interop.client.internal.InteropManager incompatible with com.ibm.team.interop.client.IInteropManager
at com.ibm.team.connector.scm.client.JzRepoResource.getInteropManager(JzRepoResource.java:462)
at com.ibm.team.connector.scm.client.JzRepoResource.storeCustomProperty(JzRepoResource.java:669)
at com.ibm.team.connector.scm.client.JzRepoResource.storeCustomProperty(JzRepoResource.java:646)
at com.ibm.team.connector.scm.client.JzRepoStream.setPropertyFromClient(JzRepoStream.java:254)
at com.ibm.rational.wvcm.ri.srvc.SrvcResource.doWriteProperties(SrvcResource.java:854)

permanent link
Geoffrey Clemm (30.1k33035) | answered May 12 '09, 8:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
OK, that means that your provider is saying that there are no tasks
associated with that activity (i.e. is returning an empty list of tasks).

First question: Is this request going to the RTC provider (JzProvider)
I.e. are you are asking for the RTC work items associated with an RTC
change set, or is this request going to your provider (i.e. the CMVC
provider).

If it is going to the RTC provider, we know that code works (because we
use it for the CC synchronizer), so this would mean that the RTC
change-set in question is not associated with any RTC work items. If it
is going to the CMVC provider, then that means either that there is a
bug in that provider, or that the CMVC activity is not associated with a
CMVC task.

Cheers,
Geoff

vkcind wrote:
Hi Geoff,
Thanks for the reply.
Actually the problem still remains same. I was already sending the
feedback with the Activity.TASK_LIST and other information I needed.
And moreover I'm not getting WvcmException, which should be the case
if I try to retrieve the information, for which I did not request
for.
I'm getting the Activity object but the activity.getTasks() is
returning empty ArrayList.

permanent link
Geoffrey Clemm (30.1k33035) | answered May 12 '09, 8:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
This looks like the JazzPlainJavaClient libraries are not compatible
with the source that you are compiling your code against. I haven't
tried the JazzPlainClient libraries myself, so don't have personal
experience with that. I'd suggest loading the full source into your
Eclipse workspace, and see if you can avoid the version skew that way.
Also, feel free to send me email, which I can forward to the SCM
Connector development team (but note that they are heads down getting
RTC-2.0 wrapped up, so until it freezes, they will have limited cycles).

Cheers,
Geoff

vkcind wrote:
Also, I downloaded the RTC2.0 beta -1 JazzPlainJavaClient libraries
and I'm trying the use it with my wizard plugin, which is used to
create a stream by extracting the code from CMVC. For this stream I
need to store some custom properties such CMVC release name etc. But
when I call stream.doWriteProperties(), I'm getting the following
exception, though the IInteropManager interface and class
InteropManager are in the same jar which is available in the
JazzPlainJavaClient libraries only.

javax.wvcm.WvcmException: Could not set property:
com.ibm.team.connector.cmvc:CMVC_RELEASE_NAME
at
com.ibm.rational.wvcm.ri.srvc.SrvcResource.doWriteProperties(SrvcResource.java:863)
at
com.ibm.rational.wvcm.ri.srvc.WvcmService.writeProps(WvcmService.java:340)
at
com.ibm.rational.wvcm.ri.srvc.WvcmService.doUpdateProperties(WvcmService.java:674)
at
com.ibm.rational.wvcm.ri.impl.WvcmServiceConverter.doWriteProperties(WvcmServiceConverter.java:466)
at
com.ibm.rational.wvcm.ri.impl.ResourceImpl.doWriteProperties(ResourceImpl.java:217)
at
com.ibm.team.connector.scm.cmvc.ide.ui.wizards.CmvcImportWizard$1.run(CmvcImportWizard.java:240)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Caused by: java.lang.ClassCastException:
com.ibm.team.interop.client.internal.InteropManager incompatible with
com.ibm.team.interop.client.IInteropManager
at
com.ibm.team.connector.scm.client.JzRepoResource.getInteropManager(JzRepoResource.java:462)
at
com.ibm.team.connector.scm.client.JzRepoResource.storeCustomProperty(JzRepoResource.java:669)
at
com.ibm.team.connector.scm.client.JzRepoResource.storeCustomProperty(JzRepoResource.java:646)
at
com.ibm.team.connector.scm.client.JzRepoStream.setPropertyFromClient(JzRepoStream.java:254)
at
com.ibm.rational.wvcm.ri.srvc.SrvcResource.doWriteProperties(SrvcResource.java:854)

permanent link
Vinod Kumar (9612010) | answered May 14 '09, 1:04 a.m.
JAZZ DEVELOPER
Hi Geoff,
My problem related to WvcmException is resolved by removing the RTC2.0 beta -1 JazzPlainJavaClient libraries and using RTC2.0 beta -1 Client pluginsas target platform. But the original proble remains same.

I did the following steps:

1. Create a RTC stream using RTC Wvcm API
Stream stream = p.stream(p.rootLocation().child(name));
stream.doCreateGeneratedResource(feedback);
2. Created a repository workspace for a specific user (cmvcuser) using RTC Wvcm API
Workspace ws = p.workspace(p.rootLocation().child(name));
ws.doCreateGeneratedResource(feedback);
3. Added some files to repository workspace created in step 2. and updated the stream created in step 1. using
Stream.doUpdate(Stream.provider().resourceList(Workspace), null);
4. I created another repository workspace from RTC development environment for another user (test) with the flow target as the stream created in 1st step.
5. Made some file changes in workspace created in step 4. (files modified, new files created etc), created a work item, and delivered those changes associating with the work item created.
6. Then I took stream created in 1st step as first stream and got another stream from workspace created in step 2. using Stream = Workspace.getStream();
7. So as per my understanding, these 2 stream will differ as per the changes done in step 5.
The Problem:
I'm gettiing the version changes, as well as the change sets I associated in step 5 but not getting the workitem associated (i.e the tasklist is empty)

permanent link
Geoffrey Clemm (30.1k33035) | answered May 14 '09, 11:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Since this is getting very detailed, let's take it off into a work item.
But as one more comment for the forum, Paul believes that the problem is
that the team is not loading the file system component into their
development environment, so the "change set link" is not defined (and
therefore cannot be retrieved programatically). But this not an "error"
for the getLinks methods, so you're just getting a empty list, not an error.

Cheers,
Geoff

vkcind wrote:
Hi Geoff,
My problem related to WvcmException is resolved by removing the
RTC2.0 beta -1 JazzPlainJavaClient libraries and using RTC2.0 beta -1
Client pluginsas target platform. But the original proble remains
same.

I did the following steps:

1. Create a RTC stream using RTC Wvcm API
Stream stream = p.stream(p.rootLocation().child(name));
stream.doCreateGeneratedResource(feedback);
2. Created a repository workspace for a specific user (cmvcuser) using
RTC Wvcm API
Workspace ws = p.workspace(p.rootLocation().child(name));
ws.doCreateGeneratedResource(feedback);
3. Added some files to repository workspace created in step 2. and
updated the stream created in step 1. using
Stream.doUpdate(Stream.provider().resourceList(Workspace), null);
4. I created another repository workspace from RTC development
environment for another user (test) with the flow target as the
stream created in 1st step.
5. Made some file changes in workspace created in step 4. (files
modified, new files created etc), created a work item, and delivered
those changes associating with the work item created.
6. Then I took stream created in 1st step as first stream and got
another stream from workspace created in step 2. using Stream =
Workspace.getStream();
7. So as per my understanding, these 2 stream will differ as per the
changes done in step 5.
The Problem:
I'm gettiing the version changes, as well as the change sets I
associated in step 5 but not getting the workitem associated (i.e the
tasklist is empty)

permanent link
Vinod Kumar (9612010) | answered Jun 09 '09, 12:03 a.m.
JAZZ DEVELOPER
Hi Geoff,

The problem I was facing with tasklist was resolved by modifying the class-path as suggested by Paul. Now I'm able to get the version changes and associated tasks(Jazz Work items) in isolation, but I'm not able to find a WVCM API which gives me the which versions were changes against a specific work item in Jazz. Since CMVC requires a defect/feature (equivalent to Work item in Jazz) to be associated with the file(s) changes, I would need the corresponding work item before synchronizing the changes done in RTC to CMVC repository.
I also had discussion with Maneesh Mehra regarding this, hementioned that when checking in the code in CC, a new activity is created every time and that no API method is provided in Jazz WVCM API and he suggested to access property 'Activity.LATEST_VERSION_LIST' but when I tried that, I got the error message that this property is not supported for JzRepoChangeSet. Is ther any plan to have such API in future.
Regards,
Vinod

Since this is getting very detailed, let's take it off into a work item.
But as one more comment for the forum, Paul believes that the problem is
that the team is not loading the file system component into their
development environment, so the "change set link" is not defined (and
therefore cannot be retrieved programatically). But this not an "error"
for the getLinks methods, so you're just getting a empty list, not an error.

Cheers,
Geoff

vkcind wrote:
Hi Geoff,
My problem related to WvcmException is resolved by removing the
RTC2.0 beta -1 JazzPlainJavaClient libraries and using RTC2.0 beta -1
Client pluginsas target platform. But the original proble remains
same.

I did the following steps:

1. Create a RTC stream using RTC Wvcm API
Stream stream = p.stream(p.rootLocation().child(name));
stream.doCreateGeneratedResource(feedback);
2. Created a repository workspace for a specific user (cmvcuser) using
RTC Wvcm API
Workspace ws = p.workspace(p.rootLocation().child(name));
ws.doCreateGeneratedResource(feedback);
3. Added some files to repository workspace created in step 2. and
updated the stream created in step 1. using
Stream.doUpdate(Stream.provider().resourceList(Workspace), null);
4. I created another repository workspace from RTC development
environment for another user (test) with the flow target as the
stream created in 1st step.
5. Made some file changes in workspace created in step 4. (files
modified, new files created etc), created a work item, and delivered
those changes associating with the work item created.
6. Then I took stream created in 1st step as first stream and got
another stream from workspace created in step 2. using Stream =
Workspace.getStream();
7. So as per my understanding, these 2 stream will differ as per the
changes done in step 5.
The Problem:
I'm gettiing the version changes, as well as the change sets I
associated in step 5 but not getting the workitem associated (i.e the
tasklist is empty)

permanent link
Geoffrey Clemm (30.1k33035) | answered Jun 09 '09, 12:37 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
One question: Are you using the standard sync algorithm (defined in
InteropStream.java), or are you writing your own sync algorithm? If you
are using the standard sync algorithm, it will just ask the CMVC WVCM
provider to create a new task (a CMVC defect/feature) for each sync, and
will associate all new CMVC versions created by the sync with that new
task, so you wouldn't need to ask the Jazz WVCM provider for its work
item(s).

Cheers,
Geoff

vkcind wrote:
Hi Geoff,

The problem I was facing with tasklist was resolved by modifying the
class-path as suggested by Paul. Now I'm able to get the version
changes and associated tasks(Jazz Work items) in isolation, but I'm
not able to find a WVCM API which gives me the which versions were
changes against a specific work item in Jazz. Since CMVC requires a
defect/feature (equivalent to Work item in Jazz) to be associated
with the file(s) changes, I would need the corresponding work item
before synchronizing the changes done in RTC to CMVC repository.
I also had discussion with Maneesh Mehra regarding this, hementioned
that when checking in the code in CC, a new activity is created every
time and that no API method is provided in Jazz WVCM API and he
suggested to access property 'Activity.LATEST_VERSION_LIST' but when
I tried that, I got the error message that this property is not
supported for JzRepoChangeSet. Is ther any plan to have such API in
future.
Regards,
Vinod

gmclemmwrote:
Since this is getting very detailed, let's take it off into a work
item.
But as one more comment for the forum, Paul believes that the
problem is
that the team is not loading the file system component into their
development environment, so the "change set link" is not
defined (and
therefore cannot be retrieved programatically). But this not an
"error"
for the getLinks methods, so you're just getting a empty list, not
an error.
Cheers,
Geoff

vkcind wrote:
Hi Geoff,
My problem related to WvcmException is resolved by removing the
RTC2.0 beta -1 JazzPlainJavaClient libraries and using RTC2.0 beta
-1
Client pluginsas target platform. But the original proble remains
same.

I did the following steps:

1. Create a RTC stream using RTC Wvcm API
Stream stream = p.stream(p.rootLocation().child(name));
stream.doCreateGeneratedResource(feedback);
2. Created a repository workspace for a specific user (cmvcuser)
using
RTC Wvcm API
Workspace ws = p.workspace(p.rootLocation().child(name));
ws.doCreateGeneratedResource(feedback);
3. Added some files to repository workspace created in step 2. and
updated the stream created in step 1. using
Stream.doUpdate(Stream.provider().resourceList(Workspace), null);
4. I created another repository workspace from RTC development
environment for another user (test) with the flow target as the
stream created in 1st step.
5. Made some file changes in workspace created in step 4. (files
modified, new files created etc), created a work item, and
delivered
those changes associating with the work item created.
6. Then I took stream created in 1st step as first stream and got
another stream from workspace created in step 2. using Stream =
Workspace.getStream();
7. So as per my understanding, these 2 stream will differ as per
the
changes done in step 5.
The Problem:
I'm gettiing the version changes, as well as the change sets I
associated in step 5 but not getting the workitem associated (i.e
the
tasklist is empty)

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.