Include Java code in BIRT reports
Hi,
I´m trying to create a BIRT report that includes Java code. I have followed all the steps in this blog:
https://www.ibm.com/developerworks/community/blogs/JazzyTunes/entry/creating_birt_reports_for_rtc_which_invokes_java_code?maxresults=15&lang=en
However, when I restart the server, I see the following error in the ccm log:
[ Launch callback handler] WARN eam.repository.provision.internal.ProvisionService - CRJZS0383E The "com.ibm.team.reports.service.birt.myjavacode" bundle could not be resolved.
As a consequence, I´m not able to execute the Java code from the BIRT report.
I´m using CLM 5.0. I don't know what I´m doing wrong. Those steps also apply for 5.0?
(same issue with 4.0.5)
This is my configuration (ignore the <o:p> tags and some others that were added by the wiki editor):
Fragment MANIFEST.MF
------------------------------------
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.ibm.team.reports.service.birt.myjavacode
Bundle-SymbolicName: com.ibm.team.reports.service.birt.myjavacode;singleton:=true
Bundle-Version: 1.0.0.qualifier
Fragment-Host: com.ibm.team.reports.service.birt;bundle-version="[2.2.3000.v20131217_0302,3.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
feature.xml --------------
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.ibm.team.reports.service.birt.myjavacode.feature"
label="com.ibm.team.reports.service.birt.myjavacode.feature"
version="1.0.0.qualifier"> <plugin
id="com.ibm.team.reports.service.birt.myjavacode"
download-size="0"
install-size="0"
version="1.0.0.qualifier"
fragment="true"
unpack="false"/>
</feature>
Site.xml -------------------
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/com.ibm.team.reports.service.birt.myjavacode.feature_1.0.0.201407211705.jar" id="com.ibm.team.reports.service.birt.myjavacode.feature" version="1.0.0.201407211705"/>
</site>
provision file (myjavacode_provision.ini) url=file:ccm/sites/myjavacode-update-site
featureid=com.ibm.team.reports.service.birt.myjavacode.feature
I´ll appreciate your help
|
3 answers
Well, a bit closer. The problem was the version of the fragment's hosting plugin com.ibm.team.reports.service.birt. I was using 2.2.3000.v20131217_0302, however the version deployed in the server is 2.2.2000.v20131010_0700".
Now I dont' see any errors in the provision status, however the script fails when tries to invoke that Java code. This is the script I´m using:
importPackage(Packages.com.arris.mypackage);
index = 0;
var myJavaObj = new Packages.com.arris.mypackage.MyJavaClass();
Is there any way to verify that the Fragment was included properly in the BIRT plugin?
|
There we go! The problem is that the script fails in Preview mode, but it works when you create the Resource and then create a report from that resource.
Hope it can help somebody else.
Thanks,
|
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.