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

How to find the workspace programatically?

How to find the repository workspace programmatically when workspace name is known?
Workspace manager does not provide any method to get the IWorkspaceConnection to a particular workspace whose name is know. It provides the createWorkspace method which returns IWorkspaceConnection but how to find a IWorkspaceConnection on an existing workspace?

0 votes



8 answers

Permanent link
IWorkspaceManager.findWorkspacesByName() gives IItemQueryPage, iterating
through which I can get the IWorkspaceHandle for a required workspace.
Now how can I get IWorkspaceConnection from this?

IWorkspaceManager has a getWorkspaceConnection() method that takes a
workspace handle and returns a connection.

- Dmitry

0 votes


Permanent link
IWorkspaceManager.findWorkspacesByName() gives IItemQueryPage, iterating through which I can get the IWorkspaceHandle for a required workspace. Now how can I get IWorkspaceConnection from this?

0 votes


Permanent link
I'm getting java.lang.NullPointerException when calling
IItemQueryPage itemQueryPage = wm.findWorkspacesByName("Example Workspace", true , false , false , 2, monitor);
and not abl to figure out why it is happening

0 votes


Permanent link
vkcind wrote:
I'm getting java.lang.NullPointerException when calling
IItemQueryPage itemQueryPage = wm.findWorkspacesByName("Example
Workspace", true , false , false , 2, monitor);
and not abl to figure out why it is happening

What is the stack trace? (Top 10 lines)


JohnC
SCM Server

0 votes


Permanent link
Here is the trace:
log4j:WARN No appenders could be found for logger (com.ibm.team.repository).
log4j:WARN Please initialize the log4j system properly.
Contacting https://localhost:9443/jazz/...
Connected
Exception in thread "main" java.lang.NullPointerException
at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy.notifyProcess(ScmServiceInterfaceProxy.java:127)
at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy.invoke(ScmServiceInterfaceProxy.java:95)
at $Proxy10.findWorkspacesByName(Unknown Source)
at com.ibm.team.scm.client.internal.WorkspaceManager.findWorkspacesByName(WorkspaceManager.java:1051)
at com.ibm.rational.connector.cmvc.Synch.findSyncWorkspace(Synch.java:74)
at com.ibm.rational.connector.cmvc.Synch.createChangeSetForCmvc(Synch.java:97)
at com.ibm.rational.connector.cmvc.Synch.main(Synch.java:43)

0 votes


Permanent link
That NPE means that the process client library was not found for some
reason. Not sure what is happening exactly. What set of jazz client
bundles do you run with?

vkcind wrote:
Here is the trace:
log4j:WARN No appenders could be found for logger
(com.ibm.team.repository).
log4j:WARN Please initialize the log4j system properly.
Contacting https://localhost:9443/jazz/...
Connected
Exception in thread "main" java.lang.NullPointerException
at
com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy.notifyProcess(ScmServiceInterfaceProxy.java:127)
at
com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy.invoke(ScmServiceInterfaceProxy.java:95)
at $Proxy10.findWorkspacesByName(Unknown Source)
at
com.ibm.team.scm.client.internal.WorkspaceManager.findWorkspacesByName(WorkspaceManager.java:1051)
at
com.ibm.rational.connector.cmvc.Synch.findSyncWorkspace(Synch.java:74)
at
com.ibm.rational.connector.cmvc.Synch.createChangeSetForCmvc(Synch.java:97)
at com.ibm.rational.connector.cmvc.Synch.main(Synch.java:43)

0 votes


Permanent link
I'm running RTC 1.0.1 and downloaded the Jazz Plain Java Client Libraries from Incubators section of Rational Team Concert 1.0.1 downloads

0 votes


Permanent link
vkcind wrote:
I'm running RTC 1.0.1 and downloaded the Jazz Plain Java Client
Libraries from Incubators section of Rational Team Concert 1.0.1
downloads


What is your classpath?

JohnC

0 votes

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,943

Question asked: Nov 11 '08, 12:47 a.m.

Question was seen: 9,335 times

Last updated: Nov 11 '08, 12:47 a.m.

Confirmation Cancel Confirm