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 |
Accepted answer
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
Ralph Schoon (63.5k●3●36●46)
| 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.
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
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.