It's all about the answers!

Ask a question

Accessing RTC repository from java class invoked by BIRT report

Shay Atzitz (112) | asked May 28 '15, 5:19 a.m.
edited May 28 '15, 5:23 a.m.

Hello all.

We are trying to create a birt report that uses a java class as the data source.

Following the steps described in the article:

We were able to call the class successfully from the BIRT report.

The java class needs to access the RTC repository in order to fetch the data it needs for it's calculations.

When we try calling the getService method, we get an exception.

When Calling:


We receive: The service '' failed to find the

required service 'interface'. Check <prerequisites>

in plugin.xml.

When Calling:


We receive: The service '' failed to find the
required service 'interface'. Check <prerequisites> in plugin.xml.

The services are defined in the <prerequisites> of the fragment.xml

We also tried calling these services from a WorkItem Operation Advisor -

and in that case - everything worked just fine, and we were able to get the needed data from RTC.

So - the question is -

What should we do in order to access RTC services from a java class called from a BIRT report.

Many thanks in advance.


One answer

permanent link
Rafik Jaouani (5.0k16) | answered May 28 '15, 3:31 p.m.
getService() can only be called from code in a method of an existing service that has a dependency on that service declared in the plugin.xml. There is probably a non API way to do this. But I really do not want it exposed in a public forum.

Shay Atzitz commented May 31 '15, 8:00 a.m.

Hi Rafik.

Thanks a lot for the quick reply.

We found out that only the first instance of the class, an instance created when the server first starts up, has the ability to access the services.

And when we call

new pkg.ClassName();

from the report, the services are not available.

So we now hold a reference to the first instance, and rely on it to access the services for the instances required by the report.

Your answer

Register or to post your answer.