Checking availability of “org.eclipse.birt.report.engine.api.ReportRunner”
I would like to try the current software out. But I stumbled on the following information then after I adjusted line terminators in a shell script for my Linux system.
Markus_Elfring@…:~/Downloads/Freeware/birt-runtime-osgi-4.9.0-20220315/ReportEngine> ./genReport2.sh -f PDF -o ~/…/Test1/Probe1.pdf ~/…/Test1/Test1.rptdesign
BIRT_HOME=/home/Markus_Elfring/Downloads/Freeware/birt-runtime-osgi-4.9.0-20220315/ReportEngine/platform
WORK_DIR=/home/Markus_Elfring/Downloads/Freeware/birt-runtime-osgi-4.9.0-20220315/ReportEngine
Fehler: Hauptklasse org.eclipse.birt.report.engine.api.ReportRunner konnte nicht gefunden oder geladen werden
Ursache: java.lang.ClassNotFoundException: org.eclipse.birt.report.engine.api.ReportRunner
Where should the mentioned class be usually stored?
Pls take a look at the corresponding windows script file genReport.bat
It seems like the linux script is broken - probably because all the developers are using Windows.
Personally, I can't tell what's wrong with the OSGI runtime, never used it myself.
But I can help regarding the POJO runtime.
For the POJO runtime, the idea is to simply add every JAR inside ReportEngine/lib to the CLASSPATH (and you have to add your own classes, e.g. for the JDBC driver).
Java offers the not-so-well-known construct directory_name\* on Windows resp. directory_name/* on Linux to make this easy.
In this case Java add alls files inside the directory. Note: On Linux, the shell already does this "globbing".
I think that the Linux script is missing something analog to this line from the windows script:
set BIRTCLASSPATH=%THIS_DIR%\lib\*
For POJO, the directory layout is slightly different.
Did other software users get used more to the possibility to set a variable like “BIRTCLASSPATH” explicitly?
To me it is not quite clear what you want. If you just want to generate a report in a separate process, there is no need to mess with the OSGI runtime. It is much more straightforward to use the POJO runtime in that case instead of the OSGI runtime.
The windows script file genReport.bat of the POJO runtime just adds everything in the reportEngine\lib subdirectory to the class path and then calls a java class to generate a single report from the command line.
Please note that the script genReport.bat (or genReport.sh) is not recommended for production for performance reasons. It is rather a proof of concept demonstrating how to run a single report - not distinguishing between the initialization of the engine (slow, but only needed once) and actually running a report (with RunTask/RenderTask or RunAndRenderTask).
If you want to use BIRT reports in your application, you can either use (and maybe extend) the web viewer using HTTP or you integrate BIRT into your Java program code (I think there is a tutorial for that somewhere).
I would like to achieve that some output files can be generated (according to selected reports) also by provided command-line interfaces. :crystal_ball: How will the run time characteristics evolve further for the involved software components?
Didn't I answer these questions already? Please take the time to examine the Windows script of the POJO runtime. It should be pretty easy to adopt the Linux script.
I examined the mentioned scripts to some degree.
:crystal_ball: Some issues are still waiting on corresponding improvements according to selected software runtime variants, aren't they?
Closing! Please test against the current milestone:
https://download.eclipse.org/birt/updates/milestone/latest/index.html