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

RTC Extending, Runnable Jar (getClientLibrary returns null)

 Hello,
I want to create from my project which manages absences a runnable jar, I am using the Plain Java Api and a absences API from rsjazz, but everytime I try to run the program, a NullPointerException occurs because the method getClientLibrary(IResourcePlanning.class) returns null, what can I do against it, in order to run my program successfully,

Thanks in advance.

Nicolai Helldorff

0 votes


Accepted answer

Permanent link
Because the package is com.ibm.team.apt.internal.client.resource IResourcePlanningClient is therefore part of the agile planning internal API. This is only shipped with the RTC Eclipse client SDK and not with the Plain Java Client Libraries. You would have to find the jar that contains it and add it to the classpath.
selected this answer as the correct answer

0 votes

Comments

 I found the jar but and added it "as external jar" but it still doesn't work 

FileName: com.ibm.team.apt.client_3.0.1400.v20151219_0057.jar

This is not API related, these are simple Java questions. Adding it as an external JAR does only make sense in Eclipse. Outside of Eclipse the JAR file needs to be available in the classpath. Consider to search Stackoverflow.com for basic Java Questions.

Thank you :)

I was despairing on this task ^^
Have a nice day


One other answer

Permanent link
The call is
final IResourcePlanningClient resourcePlanning = (IResourcePlanningClient) teamRepository.getClientLibrary(IResourcePlanningClient.class);

IResourcePlanning.class does not exist or is no client library.

0 votes

Comments

In the code i have here, this works. Make sure to test that in debug mode. I have also answered on your other question with respect to the jar file.

I haven't changed your code, it is as you wrote in the program, I just described it badly in the question. 

My problem is, that if I try to execute the runnable jar file from a batch script, the Method getClientLibrary returns null, if i execute it in Rational Team Concert everything works fine.
So my question is what can I do against it that the method getClientLibrary does not return null.
I want to let the jar run as standalone

 From this jar file I can access ITeamBuildClient but not IResourcePlanningClient


ITeamBuildClient buildClient = (ITeamBuildClient) sec.getRepository().getClientLibrary(ITeamBuildClient.class); // works
IResourcePlanningClient plan = (IResourcePlanningClient) sec.getRepository().getClientLibrary(IResourcePlanningClient.class); // returns null

As an administrator and moderator I can decide to remove buttons from other people posts or to ban users that create buttons and remove them from the forum entirely 8).

But what, if I need a button or a progess bar to express my problems with the java basics? ;)

You've been warned 8P. You too!

showing 5 of 6 show 1 more comments

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

Question asked: Jul 13 '16, 7:30 a.m.

Question was seen: 2,162 times

Last updated: Jul 13 '16, 11:01 a.m.

Confirmation Cancel Confirm