It's all about the answers!

Ask a question

JDOM library in RTC follow-up plug-in extension


Dmitry A. Lesin (23823587) | asked Mar 17 '14, 1:06 a.m.
edited Mar 17 '14, 1:19 a.m.
Hello!
We develop a follow-up action which could save an XML file based on change of a Rational Team Concert work item. Accordingly, we were trying to use our libraries with JDOM developed earlier in Eclipse RCP development projects. But it's a strange situation - when we execute the plug-in with JDOM with Jetty launch configuration (from a typical RTC Workshop from IBM) - everything ok. But when we deploy the RTC plug-in to the real CCM server, we can not use it at all!

The behavior is interesting but we can not explain how it behaves. Debugging Tomcat server remotely, until the JDOM functions are reached, code works properly. After creation of JDOM objects, the debugging process stumbles (pointing to blank lines and lines with comments). I'd like to mention that InvocationTargetException source is opened after pressing Save button in work item editor.

After the code is passed, the error in RTC takes place:

Error running operation 'Saving Work Item'

java.lang.Error: Unresolved compilation problem:
    Syntax error on token "Invalid Character", delete this token

java.lang.Error: Unresolved compilation problem:
    Syntax error on token "Invalid Character", delete this token


The follow-up plug-in itself is installed without any problems. But the problems are taking place when a work item is changed!
If we exclude any usage of JDOM, the code works properly. Is any way to use JDOM plug-in with CCM server?

May be some curcuimstancies will be interesting:

1. We used "org.jdom_1.1.1.v201101151400.jar" from Eclipse Kepler SR2, which was placed into RTC SDK and used as an Eclipse plug-in for server service part of RTC component.

2. We do everything like a typical sample which is perfectly described in "RTC Extensions Workshop":

https://jazz.net/library/article/634

3. We use Jazz CLM v4.0.5.

4. We use full Eclipse Kepler SR2 with target pointing to RTC SDK for CCM v4.0.5.

Please, can somebody give an advice whether Eclipse JDOM library can be used in conjunction with CCM server? Or may be there are other best practices to create XML files? Thank you very much in advance!

Comments
Ralph Schoon commented Mar 17 '14, 5:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I have no idea, unfortunately. I hope someone else can provide some ideas here.


Dmitry A. Lesin commented Mar 17 '14, 5:09 a.m.

Hi Ralh,
Thank you for the reply!

I have an idea that I added a plug-in instead of server feature. But I can be wrong, and I hope my assumption isn't too much funny.  :)


Ralph Schoon commented Mar 17 '14, 5:18 a.m. | edited Mar 17 '14, 5:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Dmitry,

please check that you did not include a dependency to a client API. This can happen (happened to me), because the client API is actually available in the SDK and you won't recognize this issues on Jetty.

I would have expected issues with class not found or other issues like unresolved bundles in this case, but if it boils down to this, I'd be interested to know.

One answer



permanent link
Dmitry A. Lesin (23823587) | answered Mar 24 '14, 12:59 p.m.
I spent some time investigating this issue and can make some conclusions. Apparently, there are some problems when an RTC plug-in, which is built as a follow-up action for Jazz environment, calls to external classes with methods (for example, if you try to use the software libraries developed earlier). In this case, I have got an unstable work in different cases when calling the constructors for such objects in real time.
But when I placed all methods from external classes into the main class which inherits from AbstractService in service component then the solution became work well!
May be I'm wrong in my conclusions but now it works!

Comments
Dmitry A. Lesin commented Mar 24 '14, 1:03 p.m.

And please take into account that no problems with the simplified Jetty environment when you are developing your solution and debug it locally!


Ralph Schoon commented Mar 24 '14, 1:33 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I have seen issues with class loaders and their configuration dependent on the application server. I don't really have a lot of experience here, but I have seen things working on Tomcat and not on WAS. Especially if you reference to a special class loader. Not sure if this applies here.

Your answer


Register or to post your answer.