BIRT importPackage works in Eclipse Studio but not when deployed #970
Planet-RWehner
started this conversation in
General
Replies: 1 comment 4 replies
-
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Eclipse: Version: Neon.3 Release (4.6.3) Build id: 20170314-1500
BIRT: 4.6.0.v201606072122
Using BIRT rptdesign file in eclipse studio, I am using importPackage on a .jar file I created from an external library cronUtils. Placed in subfolder to my main folder named 'lib'. Included in report's Resources as 'lib/crontils.jar'.
Folders are like:
.(main report .js and .rptlibrary files)
.\reports(the .rptdesign file)
.\lib\cronutils.jar
reporting engine uses .\ as main 'current' folder.
Running report in eclipse studio works fine with built in Viewer or to PDF.
Deployed to my server, same folder structure and files, when first trying to use one of the classes imported from the package I get an error message: ReferenceError: "CronParser" is not defined.
Code like this:
report 'initialize' script
try {
IRMNBirtlog("report 'initialize' - importing packages...", Level.INFO); // just a logging function to a text file.
importPackage(Packages.java.util.logging);
importPackage(Packages.java.util); // for Locale
importPackage(Packages.com.cronutils.parser);
importPackage(Packages.com.cronutils.descriptor);
importPackage(Packages.com.cronutils.model);
importPackage(Packages.com.cronutils.model.definition);
} catch(e) {
IRMNBirtlog("report 'initialize' - error importing packages: " + e, Level.INFO);
}
report 'open' script
IRMNBirtlog("init CronExpressionParser.", Level.INFO);
var theparser = new CronParser(CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ));
since it is running on the server, there is no call stack crash log, or I just don't know where to look for one.
Is there a way to find out if the 'importPackage' actually succeeded? and if not, why?
Why would it work in the eclipse studio in either debug or normal perspective and not on server with same files.
I verified all files are on the server in correct structure.
in desperation I tried copying the .jar file to the same folder as the .rptdesign file and to the .\ folder with no success.
Thanks for any guidance you can provide.
Beta Was this translation helpful? Give feedback.
All reactions