It's all about the answers!

Ask a question

How to find the workspace programatically?


Vinod Kumar (9632010) | asked Nov 11 '08, 12:47 a.m.
JAZZ DEVELOPER
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?

8 answers



permanent link
Dmitry Karasik (1.8k11) | answered Nov 11 '08, 4:08 a.m.
JAZZ DEVELOPER
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

permanent link
Vinod Kumar (9632010) | answered Nov 11 '08, 7:21 a.m.
JAZZ DEVELOPER
IWorkspaceManager.findWorkspacesByName() gives IItemQueryPage, iterating through which I can get the IWorkspaceHandle for a required workspace. Now how can I get IWorkspaceConnection from this?

permanent link
Vinod Kumar (9632010) | answered Nov 14 '08, 5:14 a.m.
JAZZ DEVELOPER
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

permanent link
John Camelon (1.7k14) | answered Nov 14 '08, 10:08 a.m.
JAZZ DEVELOPER
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

permanent link
Vinod Kumar (9632010) | answered Nov 17 '08, 12:03 a.m.
JAZZ DEVELOPER
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)

permanent link
John Camelon (1.7k14) | answered Nov 17 '08, 4:08 p.m.
JAZZ DEVELOPER
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)

permanent link
Vinod Kumar (9632010) | answered Nov 18 '08, 1:07 a.m.
JAZZ DEVELOPER
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

permanent link
John Camelon (1.7k14) | answered Nov 18 '08, 1:48 p.m.
JAZZ DEVELOPER
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

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.