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

External JAR/API use in RTC Plugin

Hi,

I need to perform several actions on pre & post save of RTC Defect. For that I am trying to develop plugin, which will call some external apis from my RTC plugin. But, whenever I add some code ( which uses some third party jars ), my plugin gives me error "Internal error. Unable to instantiate advisor MyExample.SaveDemo"

Can anyone please help me for the same.

- riddhi

1 vote


Accepted answer

Permanent link
put your extra jar files in the plugin project lib directory

then in your plugin.xml,
(UI editor), go to the Runtime tab, Classpath section (lower right), and add all the jar files from LIB you want in the plugin build.

then go to the Build tab, and in the 'Binary include' section, expand the LIB folder and select the jar files to add to the build output..

the files will be added to the plugin jar file contents

this should show up in the manifest.mf file and the build tab

works for me on a couple plugins.

note that you cannot select path or file outside the plugin structure.
Riddhi Shah selected this answer as the correct answer

2 votes


One other answer

Permanent link
Hi Riddi,

see https://jazz.net/forum/questions/83743/how-to-call-java-classes-on-save-button-in-workitem-page

0 votes

Comments

Thanks Ralph.

I have followed all the steps of given link. The issue comes if when I create a plugin and my plugin requires some third party library to perform some actions. For example, on save plugin will send mail to specific teams.

  • riddhi

Hi Riddi, I believe it is possible to package and access external Jar's inside a plugin. I think Ihave done that some years back. Currently I have no example to test though. Most important are the tabs "Runtime" and "Build" on the plugin editor.

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
× 1,700
× 383

Question asked: Aug 03 '12, 2:16 a.m.

Question was seen: 7,474 times

Last updated: Aug 05 '12, 8:41 a.m.

Confirmation Cancel Confirm