It's all about the answers!

Ask a question

How avoid Error 500: ... Unsupported/Unknown required feature: com.ibm.rdm.rm.api


Dmitry A. Lesin (24825896) | asked Jul 17 '17, 9:48 a.m.

Hello!
I'm developing Rational DOORs NG client extension with "OpenSocial Gadget" widget. It's a very simple custom script that shows a text only on the Minidashboard panel. And when I go to RM application, it works well. But when I go, for example, to Jazz Team Server Home, it shows me:

Error 500: The gadget cannot be rendered due to one or more errors: Unsupported/Unknown required feature: com.ibm.rdm.rm.api
I understand that the problem is in the text of main XML file:

<Require feature="com.ibm.rdm.rm.api"/>
But I don't have understanding how I could fix it. May be I could hide the widget leaving the RM application, is it correct? Or may be there is another, more effective way. If somebody could give me an advice how to be with this annoying error, it could be perfect!
Thank you very much in advance!

2 answers



permanent link
Dmitry A. Lesin (24825896) | answered Jul 28 '17, 3:03 p.m.
edited Jul 28 '17, 3:13 p.m.
To solve the problem, first, I replaced "Require feature" to "Optional feature":
<Module specificationVersion="2.0">
<ModulePrefs title="DOORs_ID" height="700" scrolling="true">
<Optional feature="com.ibm.rdm.rm.api"/>
</ModulePrefs>
<Content type="html">
<![CDATA[
<html>
<head>
<script src="js/jquery-1.9.1.js"></script>
<script src="js/common.js"></script>
<link rel="stylesheet" type="text/css" href="css/common.css">
</head>
<body>
...
<p id="messages" class="info"></p>
...
</body>
</html>
]]>
</Content>
</Module>
Next, I added some IF logic to default function:
  if(window.location.href.search("/rm/") < 0) {
$("#messages").append("The script works in DOORs Next Generation only!");
}
else
{

RM.Event.subscribe(RM.Event.ARTIFACT_SAVED, function(saved) {
...
Now, the error isn't displayed even out of RM application. And IF operator helps to avoid error of undefined RM object, showing simple message that the script works IN RDNG only.
Now, I can handle the situation and display softer message out-of RDNG.

permanent link
Ralph Schoon (63.1k33645) | answered Jul 17 '17, 3:23 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 17 '17, 3:25 p.m.

Comments
Dmitry A. Lesin commented Jul 19 '17, 1:28 p.m.

Sorry, but I can not find there how to avoid this message. Thank you for the link anyway!


Ralph Schoon commented Jul 20 '17, 2:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Format? Encoding? So something is wrong in your file, I suppose.


Dmitry A. Lesin commented Jul 25 '17, 10:55 a.m.

  Ralph, I'm sorry. Of course, I can be wrong, but may be the problem is related to main XML file of the client extension. The begining of that file is:


<?xml version="1.0" encoding="UTF-8" ?>
<Module specificationVersion="2.0">
<ModulePrefs title="DOORs_ID" height="700" scrolling="true">
<Require feature="com.ibm.rdm.rm.api"/>
</ModulePrefs>
<Content type="html">
<![CDATA[
<html>
<head>


Dmitry A. Lesin commented Jul 25 '17, 10:58 a.m. | edited Jul 25 '17, 10:59 a.m.
I suspect that the error is in result of next string:

<Require feature="com.ibm.rdm.rm.api"/>

Dmitry A. Lesin commented Jul 25 '17, 10:59 a.m.

 May be if I will go out of RM application then I will go out of the scope of this required library. And the error takes place! But may be simply I don't understand something here.

Thank you!


Ralph Schoon commented Jul 25 '17, 3:09 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Again, read https://rsjazz.wordpress.com/2016/03/02/alien-skies-peeking-into-doors-next-extensibility/ carefully. Your code is for a open social gadget and not for a widget (as far as I can tell, because the data does not show correctly)

Carefully check with that article. The differences are subtle, but will mess you up.


Dmitry A. Lesin commented Jul 28 '17, 2:48 p.m.

Thank you! This was a problem not of RDNG itself but rather related to Google OpenSocial API. I solved it by a simple code modification as it's described below in my answer.

showing 5 of 7 show 2 more comments

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.