Add Absences to users using Client APIs as web-service
Hi All,
I want to add absences to all users in RTC through Server APIs but these are not available So I have to use Client APIs for this task by following this link to run at back-end as service when file uploads through web-page:
https://rsjazz.wordpress.com/2014/07/22/manage-scheduled-absences-using-the-plainjava-client-libraries/
For making Java Restful Webservice I convert this client extension which provided in the above link into Dynamic Web project and successfully created the service but then issue comes:
Caused by: java.lang.ClassNotFoundException: com.ibm.team.apt.common.resource.IContributorAbsence
Which i think the API of RTC SDK and that provided client extension will run without any issue if I run it as Java Applictation because target platform is RTC and it loads the APIs at runtime but not as a Service at compile time.
Any Help is highly appreciated
|
Accepted answer
Ralph Schoon (63.5k●3●36●46)
| answered Jan 28 '16, 2:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The Plain Java Client Libraries are contained in a zip file you can download as described in the Extensions workshop.
You have to package these libraries (JAR files) with your application and add them to the ClassPath, so they can be loaded by the class loader. Farhan Habib selected this answer as the correct answer
Comments
Farhan Habib
commented Jan 28 '16, 2:40 a.m.
Thanks Ralph for your quick response
Since there is no public API for planning and the interface is packaged with the agile planning component (.apt.) the jar file is not shipped with the plain Java Client libraries and you have to search the file com.ibm.team.apt.common*.jar in the Eclipse Plugins folder. If you use Installation manager to install RTC Eclipse, it might be in the installation manager shared folder.
You basically add that jar file to the other jar files you are using.
Thanks Ralph for your guidence, feeling honored while discussing with you
Thanks for finding this, I updated the blog post.
Farhan Habib
commented Jan 28 '16, 7:59 a.m.
Task completed
You needed both? Thanks for letting us know.
Farhan Habib
commented Jan 28 '16, 8:22 a.m.
Yes because these are the packages that were used in ScheduleAbsence Client Extension as you know:
com.ibm.team.apt.common.resource.IContributorAbsence;
com.ibm.team.apt.common.resource.IContributorAbsenceHandle;
com.ibm.team.apt.internal.client.resource.IContributorInfo;
com.ibm.team.apt.internal.client.resource.IResourcePlanningClient;
com.ibm.team.apt.internal.common.resource.model.ContributorAbsence;
com.ibm.team.apt.internal.common.util.ItemCollection;
and these needed both jars Good to know. Thank you very much!
showing 5 of 9
show 4 more comments
|
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.