Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

error while invoking getClientLibrary(IWorkItemClient.class

I try to configure a code which was working with RTC 1.0. I have upgraded jar files to 2.0 version. Everything seems fine (no compilation errors), but I get NullPointerException while invoking IWorkItemClient workItemClient= (IWorkItemClient) teamRepository.getClientLibrary(IWorkItemClient.class);.


ArrayList<WorkItem> reopenList = new ArrayList<WorkItem>();
ITeamRepository teamRepository= TeamPlatform.getTeamRepositoryService().getTeamRepository(REPOSITORY_URI);
teamRepository.registerLoginHandler(new LoginHandler(userId, password));
teamRepository.login(null);

IProcessClientService processClient= (IProcessClientService) teamRepository.getClientLibrary(IProcessClientService.class);
IAuditableClient auditableClient= (IAuditableClient) teamRepository.getClientLibrary(IAuditableClient.class);
IWorkItemClient workItemClient= (IWorkItemClient) teamRepository.getClientLibrary(IWorkItemClient.class);



Exception in thread "main" java.lang.NullPointerException
at com.ibm.team.workitem.common.internal.WorkItemCommon.<init>(WorkItemCommon.java:156)
at com.ibm.team.workitem.client.internal.WorkItemClient.<init>(WorkItemClient.java:362)
at com.ibm.team.workitem.client.internal.WorkItemClientLibraryFactory.createClientLibrary(WorkItemClientLibraryFactory.java:17)
at com.ibm.team.repository.client.internal.ClientLibraryFactoryRegistry.getClientLibrary(ClientLibraryFactoryRegistry.java:89)
at com.ibm.team.repository.client.internal.TeamRepository.getClientLibrary(TeamRepository.java:460)
at impl.CreateWorkItem.run(CreateWorkItem.java:251)
at impl.WorkItemImporter.main(WorkItemImporter.java:39)

I have no idea what can cause it... teamRepository object has proper login, password and uri.

0 votes



One answer

Permanent link
It might look as a silly question, but did you check if you are using the same version of client libraries that the server is running (including iFix)?

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
× 11,050

Question asked: Feb 07 '11, 10:24 a.m.

Question was seen: 7,370 times

Last updated: Feb 07 '11, 10:24 a.m.

Confirmation Cancel Confirm