It's all about the answers!

Ask a question

External JAR/API use in RTC Plugin


Riddhi Shah (3721518) | asked Aug 03 '12, 2:16 a.m.
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

Accepted answer


permanent link
sam detweiler (12.5k6195201) | answered Aug 05 '12, 8:41 a.m.
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

One other answer



permanent link
Ralph Schoon (63.5k33646) | answered Aug 03 '12, 3:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Riddi,

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

Comments
Riddhi Shah commented Aug 03 '12, 4:53 a.m.

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

Ralph Schoon commented Aug 03 '12, 5:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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 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.