It's all about the answers!

Ask a question

Received "TeamRepositoryException: No components have been selected from Workspace", when attempting to deliver from a workspace to a stream


Bruce Eifler (3912) | asked Dec 02 '16, 4:47 p.m.
edited Dec 06 '16, 11:07 a.m. by David Lafreniere (4.8k7)
Received "TeamRepositoryException: No components have been selected from Workspace", when attempting to deliver from a workspace to a stream (here is the error message)=>

"Could not deliver work items (71557) from workspace/stream PI60293-HMK1400.COPYSENT to workspace/stream HMK1400.ENDAPAR (No components have been selected from Workspace 'PI60293-HMK1400.COPYSENT').: No components have been selected from Workspace 'PI60293-HMK1400.COPYSENT'
No components have been selected from Workspace 'PI60293-HMK1400.COPYSENT'.

com.ibm.team.repository.common.TeamRepositoryException: No components have been selected from Workspace 'PI60293-HMK1400.COPYSENT'"

here is the top of the java exception stack to show that it is coming from RTC=>
com.ibm.team.repository.common.TeamRepositoryException: No components have been selected from Workspace 'PI60293-HMK1400.COPYSENT'
    at com.ibm.team.scm.service.internal.utils.BaselineUtils.createBaselineSet(BaselineUtils.java:802)
    at com.ibm.team.scm.service.internal.ScmServiceInternal.createBaselineSet2(ScmServiceInternal.java:3166)
    at com.ibm.team.scm.service.internal.ScmService$49$1.run(ScmService.java:2662)
    at com.ibm.team.scm.service.internal.AbstractScmService$5.run(AbstractScmService.java:624)
    at com.ibm.team.scm.service.internal.AbstractScmService$2.run(AbstractScmService.java:434)
    at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase$Transaction.run(RepositoryDatabase.java:568)
    at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase$2.run(RepositoryDatabase.java:352)
    at com.ibm.team.repository.service.internal.rdb.ConnectionPoolService.withCurrentConnection(ConnectionPoolService.java:476)...

Q: Where/how did you "attempt to deliver from a workspace to a stream"?
A:  Change sets from the workspace are being programmatically delivered to a stream.
Q: What RTC client are you using?
A: Version: 5.0.2 , Build id: RTC-I20141031-0926
Q: Do you hit this error every time? Do other colleagues always hit this error?
A: This testing is underway.
Q: Does the work space actually have components?
A: Yes.
Q: Does the work item have attached change sets?
A: Yes


Comments
Ralph Schoon commented Dec 03 '16, 11:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Please read How should I ask a question in the Forum if I want to receive useful answers? to enhance your skills in composing questions.


David Lafreniere commented Dec 03 '16, 3:36 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Note: I scanned for the string "No components have been selected from Workspace" in the source code for Jazz SCM and did not find a match. So I'm not sure where this error is coming from...perhaps this error is coming from code in EE (Enterprise Extensions) which I do not have loaded (and have not used before...). The error message is also a little odd to me because it says "Could not deliver work items".... In core Jazz SCM, the only actions we have are to "deliver change set"....

As Ralph already mentioned, this question is missing a bit of information.
Ex:
-Where/how did you "attempt to deliver from a workspace to a stream"
-What RTC client are you using? (or does this involve custom code written using the  plain java clients, or perhaps REST calls, or something else?)
-Do you hit this error every time? Do other colleagues always hit this error?
-Does the workspace actually have components? Does the work item have attached change sets?
-etc.


Bruce Eifler commented Dec 05 '16, 10:58 a.m.

I added additional information to the abstract. Hopefully that will correct my missing information.  I also added the top of the java stack to show that this is coming from RTC.
I searched our source code and was also unable to find the string ,"No components have been selected from Workspace".


Ralph Schoon commented Dec 05 '16, 11:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

What does this mean:

A:  Change sets from the workspace are being programmatically delivered to a stream.

Do you have a custom extension that you are using? Can you explain what exactly you are doing? Screenshot of the RTC UI where you do it?

Is this RTC Z or RTC I? As davis mention EE (Enterprise Extensions).


Bruce Eifler commented Dec 05 '16, 11:35 a.m.

here is the line of code we are invoking that leads to this exception=>
"IBaselineSetHandle setHandle = srcConn.createBaselineSet( excludedWorkComps, targetSnapshotName,
                  "Snapshot created by zBuild", BaselineSetFlags.CREATE_NEW_BASELINES, this.monitor );"

srcConn is an IWorkspaceConnection

Not sure how to distinguish between the two RTC types.
Here is the build id if that will help=>
Version: 5.0.2
Build id: RTC-I20141031-0926


Ralph Schoon commented Dec 05 '16, 11:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You did not even bother to read How should I ask a question in the Forum if I want to receive useful answers?, right? I would suggest to search the SDK for examples of the call you use. Also check the parameters and if there are components selected.

showing 5 of 6 show 1 more comments

Accepted answer


permanent link
David Lafreniere (4.8k7) | answered Dec 06 '16, 11:11 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Dec 06 '16, 11:23 a.m.
The error is basically saying that a snapshot is trying to be made against an empty set of components.

This I think can happen in two ways:

1. IScmService.createBaselineSet2(...) is being called to create a snapshot on a workspace/stream in which that user does not have read-access to any of the components. This behavior is made clear in the Javadoc by: "Components that are not readable by the user are filtered out." 


2. IScmService.createBaselineSet2(...) is being called in which the 'excludedComponents' argument list contains all the components (or at least all the components that are visible to the user making the request).


Bruce Eifler selected this answer as the correct answer

Comments
David Lafreniere commented Dec 06 '16, 11:13 a.m. | edited Dec 06 '16, 11:25 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

The following work item (scheduled for RTC 6.0.4) will improve that particular error message based on my answer above:

Enhance the error message in BaselineUtils.createBaselineSet() which says: "No components have been selected from {0}". (407580)

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.