Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Need Help. Cant get genReport to run.
klocki
Hello, <br />
I am trying to automate report Generation. But i am stuck with geting genReport generate my report.<br />
<br />
<br />
Windows 2008 Server<br />
- I extracted runtime to c:\BIRT\runtime<br />
- Set Eviroment Variable BIRT_HOME to c:\BIRT\runtime<br />
- copied the whole plugin directory from Birt to c:\BIRT\runtime\ReportEngine\plugins<br />
<br />
Next Step is to run genReport:<br />
<br />
C:\BIRT\runtime\ReportEngine>.\genReport.bat -m runrender -f PDF -o test.pdf -F .\MyReport_0.1.rptdesign<br />
<br />
<strong class='bbc'>This is the Error i get:</strong><br />
<br />
C:\BIRT\runtime\ReportEngine>ECHO off<br />
24.11.2011 14:10:21 org.eclipse.birt.report.engine.api.ReportRunner readConfigurationFile<br />
SCHWERWIEGEND: file: C:\BIRT\runtime\ReportEngine not exists! <br />
24.11.2011 14:10:21 org.eclipse.birt.report.engine.api.ReportRunner execute<br />
SCHWERWIEGEND: exception in parsing the paramters<br />
java.lang.NullPointerException<br />
at org.eclipse.birt.report.engine.api.ReportRunner.execute(ReportRunner.java:145)<br />
at org.eclipse.birt.report.engine.api.ReportRunner.main(ReportRunner.java:122)<br />
<br />
Any thoughts on this?<br />
Cheers Alex
Find more posts tagged with
Comments
CBR
hi,
the report engine is not just the plugins folder. It seems to be the case that you missed the configuration subfolder. Which version of BIRT do you use?
klocki
<blockquote class='ipsBlockquote' data-author="'cbrell'" data-cid="85712" data-time="1322147776" data-date="24 November 2011 - 08:16 AM"><p>
hi,<br />
<br />
the report engine is not just the plugins folder. It seems to be the case that you missed the configuration subfolder. Which version of BIRT do you use?<br /></p></blockquote>
<br />
Hi, <br />
Thank you for your quick reply. I also filled up the ReportEngine\lib folder with all the jars, just to make sure nothing is missing.It is version 3.7.1 I downloaded Birt & runtime today.<br />
<br />
alex
CBR
Sorry deployment changed in 3.7 it's just a lib folder with a bunch of jars...no plugins, no configuration folder.
Just create lib subolder in the engine folder and move all the jar files to this folder.
klocki
<blockquote class='ipsBlockquote' data-author="'cbrell'" data-cid="85716" data-time="1322159285" data-date="24 November 2011 - 11:28 AM"><p>
Sorry deployment changed in 3.7 it's just a lib folder with a bunch of jars...no plugins, no configuration folder.<br />
Just create lib subolder in the engine folder and move all the jar files to this folder.<br /></p></blockquote>
<br />
I did this but still get the same error
(
klocki
any other ideas on this problem?
br, Alex
ALV_SE
Hello,<br />
<br />
I have the same error when I do this with HTML or PDF format:<br />
<p class='bbc_indent' style='margin-left: 40px;'><span style='font-family: Courier New'>set BIRT_HOME=D:\BIRTRT<br />
%BIRT_HOME%\ReportEngine\genReport.bat --output "d:\AlV\test_ALV_BIRT.html" --format html --parameter "CM_Project_Parameter=ToolsMgt" d:\Reporting_eval\birt-rcp-report-designer-3_7_1\workspace\param_cq_stats.rptdesign</span></p>
<br />
<br />
The error is:<br />
<p class='bbc_indent' style='margin-left: 40px;'><span style='font-family: Courier New'>d:\AlV\Workspace\Projects\Reporting EIS Case>cd \BIRTRT<br />
<br />
\BIRTRT>set BIRT_HOME=D:\BIRTRT<br />
<br />
\BIRTRT>%BIRT_HOME%\ReportEngine\genReport.bat --output "d:\AlV\test_ALV_BIRT.pdf" --format PDF --parameter "CM_Project_Parameter=ToolsMgt" d:\Reporting_eval\birt-rcp-report-designer-3_7_1\workspace\param_cq_stats.rptdesign<br />
<br />
\BIRTRT>ECHO off <br />
29 nov. 2011 09:14:25 org.eclipse.birt.report.engine.api.ReportRunner execute<br />
GRAVE: exception in parsing the paramters<br />
java.lang.NullPointerException<br />
at org.eclipse.birt.report.engine.api.ReportRunner.execute(ReportRunner.java:145)<br />
at org.eclipse.birt.report.engine.api.ReportRunner.main(ReportRunner.java:122)</span><br /></p>
<br />
I have Java 1.6.27 on a Windows XP SP3 PC:<br />
<p class='bbc_indent' style='margin-left: 40px;'><span style='font-family: Courier New'>java -showversion<br />
java version "1.6.0_27"<br />
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)<br />
Java HotSpot(TM) Client VM (build 20.2-b06, mixed mode, sharing) </span></p>
<br />
And when I preview this report (param_cq_stats.rptdesign) in BIRT with this parameter value (CM_Project_Parameter = ToolsMgt), it is ok.<br />
<br />
Any idea of what goes wrong?
JasonW
Can you try creating a directory off the c drive like birtrun and copy all the libs from birt-runtime-version\reportengine\lib to this directory. set an environment variable BIRT_HOME to c:/birtrun and then try the genbat script? I think the classpath string may be to long.
Jason
ALV_SE
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="85809" data-time="1322601865" data-date="29 November 2011 - 02:24 PM"><p>
Can you try creating a directory off the c drive like birtrun and copy all the libs from birt-runtime-version\reportengine\lib to this directory. set an environment variable BIRT_HOME to c:/birtrun and then try the genbat script? I think the classpath string may be to long.<br />
<br />
Jason<br /></p></blockquote>
<br />
Thanks for your answer.<br />
<br />
I did something akin to what you suggested (simply setting to BIRT_HOME to c:\birtrun would not run), I copied the JARs in a directory C:\B (couldn't make it any shorter), modified the "genReport.bat" to the attached gr2.bat (attached as txt file).<br />
<br />
The error is still the same (btw, I have added two more parameters to this report design, hence the different command line).<br />
<p class='bbc_indent' style='margin-left: 40px;'>gr2.bat --output "d:\AlV\test_ALV_BIRT.pdf" --format PDF --parameter "CM_Project_Parameter=ToolsMgt" --parameter "CM_Component_Parameter=CQ_Application" --parameter "CM_Project_display_name_Parameter=Tools Management" d:\Reporting_eval\birt-rcp-report-designer-3_7_1\workspace\param_cq_stats.rptdesign<br />
<br />
30 nov. 2011 09:29:13 org.eclipse.birt.report.engine.api.ReportRunner execute<br />
GRAVE: exception in parsing the paramters<br />
java.lang.NullPointerException<br />
at org.eclipse.birt.report.engine.api.ReportRunner.execute(ReportRunner.java:145)<br />
at org.eclipse.birt.report.engine.api.ReportRunner.main(ReportRunner.java:122)<br /></p>
<br />
The BIRTCLASSPATH variable is 4669 characters long: I don't know what maximum length is for environment variables...<br />
<br />
Any other idea?
JasonW
Ok, I created a directory named br off the c drive and then created a ReportEngine/lib directory in it. I copied the libs to this directory and set BIRT_HOME to c:\br. I then ran the following and it worked:
C:\birt\birt-runtime-3_7_1\birt-runtime-3_7_1\ReportEngine>genReport C:\birt\bir
t-runtime-3_7_1\birt-runtime-3_7_1\ReportEngine\samples/hello_world.rptdesign
And this worked for me. Can you try this?
Jason
ALV_SE
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="85849" data-time="1322676787" data-date="30 November 2011 - 11:13 AM"><p>
Ok, I created a directory named br off the c drive and then created a ReportEngine/lib directory in it. I copied the libs to this directory and set BIRT_HOME to c:\br. I then ran the following and it worked:<br />
C:\birt\birt-runtime-3_7_1\birt-runtime-3_7_1\ReportEngine>genReport C:\birt\bir<br />
t-runtime-3_7_1\birt-runtime-3_7_1\ReportEngine\samples/hello_world.rptdesign<br />
<br />
And this worked for me. Can you try this?<br />
<br />
Jason<br /></p></blockquote>
<br />
I removed everything I did before and did what you suggested:<br />
<p class='bbc_indent' style='margin-left: 40px;'>I extracted the runtime archive as c:\b (ReportEngine is just under c:\b )<br />
<span style='font-family: Courier New'>set BIRT_HOME=C:\B<br />
cd b<br />
genReport samples\hello_world.rptdesign</span> (<strong class='bbc'>it worked ok, generating an HTML file</strong>)<br />
<span style='font-family: Courier New'>genReport -f pdf samples\hello_world.rptdesign</span> (<strong class='bbc'>it also worked ok, generating a PDF file</strong>)</p>
<br />
So I went further and tried one of my design which has no parameter:<br />
<p class='bbc_indent' style='margin-left: 40px;'><span style='font-family: Courier New'>genReport -f pdf
\Reporting_eval\birt-rcp-report-designer-3_7_1\workspace\complete_cq_stats.rptdesign</span></p>
<br />
It failed because it lacked the MySQL JDBC driver, so I added directory "org.eclipse.birt.report.data.oda.jdbc_3.7.1.v20110905" in "C:\b\ReportEngine\Plugins".<br />
<br />
Problem now is when I try to generate the report, I get the following backtrace and errors:<br />
<p class='bbc_indent' style='margin-left: 40px;'><span style='font-family: Courier New'>1 d?c. 2011 09:06:29 org.eclipse.birt.report.engine.api.ReportRunner execute<br />
GRAVE: exception in parsing the paramters<br />
org.eclipse.birt.core.exception.BirtException: error.CannotStartupOSGIPlatform<br />
at org.eclipse.birt.core.framework.Platform.startup(Platform.java:81)<br />
at org.eclipse.birt.report.engine.api.ReportRunner.execute(ReportRunner.java:142)<br />
at org.eclipse.birt.report.engine.api.ReportRunner.main(ReportRunner.java:122)<br />
Caused by: org.eclipse.birt.core.framework.FrameworkException<br />
at org.eclipse.birt.core.framework.osgi.OSGILauncher.startup(OSGILauncher.java:90)<br />
at org.eclipse.birt.core.framework.Platform.startup(Platform.java:75)<br />
... 2 more<br />
Caused by: java.security.PrivilegedActionException: org.eclipse.birt.core.framework.FrameworkException: Could not find the Framework - org.eclipse.osgi in path C:\B\ReportEngine\plugins<br />
at java.security.AccessController.doPrivileged(Native Method)<br />
at org.eclipse.birt.core.framework.osgi.OSGILauncher.startup(OSGILauncher.java:75)<br />
... 3 more<br />
Caused by: org.eclipse.birt.core.framework.FrameworkException: Could not find the Framework - org.eclipse.osgi in path C:\B\ReportEngine\plugins<br />
at org.eclipse.birt.core.framework.osgi.OSGILauncher.doStartup(OSGILauncher.java:123)<br />
at org.eclipse.birt.core.framework.osgi.OSGILauncher.access$0(OSGILauncher.java:94)<br />
at org.eclipse.birt.core.framework.osgi.OSGILauncher$1.run(OSGILauncher.java:79)<br />
... 5 more<br />
1 d?c. 2011 09:06:29 org.eclipse.birt.core.framework.osgi.OSGILauncher doShutdown<br />
ATTENTION: Framework is already shutdown</span></p>
<br />
My "solution" to this problem is to duplicate the "org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar" file found in "C:\b\ReportEngine\lib" into "C:\b\ReportEngine\Plugins", but maybe (certainly?) it is not the right thing to do...<br />
<br />
Perhaps original poster Klocki did something similar: it would be interesting to know.<br />
<br />
When I duplicate this JAR file, and try genReport, it gives me the "usual" error:<br />
<p class='bbc_indent' style='margin-left: 40px;'><span style='font-family: Courier New'>1 d?c. 2011 09:31:04 org.eclipse.birt.report.engine.api.ReportRunner execute<br />
GRAVE: exception in parsing the paramters<br />
java.lang.NullPointerException<br />
at org.eclipse.birt.report.engine.api.ReportRunner.execute(ReportRunner.java:145)<br />
at org.eclipse.birt.report.engine.api.ReportRunner.main(ReportRunner.java:122)</span></p>
<br />
Hope this helps you understanding the problem...<br />
<br />
Anyway, thanks for your help,
JasonW
Remove the jdbc plugin from the br directory. Just add the mysql driver to the br\ReportEngine\lib directory and modify the genReport.bat to add the driver to the classpath.
Jason
ALV_SE
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="86251" data-time="1322759965" data-date="01 December 2011 - 10:19 AM"><p>
Remove the jdbc plugin from the br directory. Just add the mysql driver to the br\ReportEngine\lib directory and modify the genReport.bat to add the driver to the classpath.<br />
<br />
Jason<br /></p></blockquote>
<br />
Ok, it works for me, now
<br />
<br />
Thanks a lot for your help.<br />
<br />
To summarize, when someone wants to generate a report with the command line:<br />
<p class='bbc_indent' style='margin-left: 40px;'><ul class='bbcol decimal'><li>extract the BIRT runtime in a directory with a path as short as possible (in order to avoid hitting max line or max variable length limit), for example "c:\b", with directory "ReportEngine" just below;</li><li>set "BIRT_HOME" environment variable to this path (for example, "set BIRT_HOME=c:\b");</li><li>if you need some extra JDBC driver, add the JAR into "lib" directory and modify "genReport.bat" commmand file to add this driver in "BIRTCLASSPATH" environment variable;</li></ul></p>
<br />
And you're ready to use "genReport.bat".<br />
<br />
In my case, this was:<br />
<p class='bbc_indent' style='margin-left: 40px;'><span style='font-family: Courier New'>genReport.bat --output "d:\AlV\Workspace\Projects\Reporting EIS Case\test_ALV_BIRT.pdf" --format PDF --parameter "CM_Project_display_name_Parameter=Tools Management" --parameter "CM Project name=ToolsMgt" --parameter "CM Product name=ClearQuest" --parameter "CM Component name=CQ_Application" d:\Reporting_eval\birt-rcp-report-designer-3_7_1\workspace\cascade_param_cm_stats.rptdesign</span></p>
<br />
Correct me if I forgot anything
<br />
<br />
I hope it also solved Klocki's initial problem.<br />
<br />
Thanks again JasonW<br />
<br />
Have a nice day all,
Andres Arg
You can use the CLASSPATH variable since it does NOT need to be passed in the java command line. <a class='bbc_url' href='
http://docs.oracle.com/javase/1.3/docs/tooldocs/win32/classpath.html'>(
See javase docs win32 classpath</a><br />
<br />
<br />
So you can change the genReport.bat by:<br />
1-Setting the <strong class='bbc'>CLASSPATH</strong> variable instead of the BIRTCLASSPATH variable <br />
<br />
set CLASSPATH=%BIRT_HOME%\ReportEngine\lib\mysql-con ......<br />
<br />
2- Remove the <strong class='bbc'>-cp "%BIRTCLASSPATH%"</strong> from the %JAVACMD% call
spandian
Hi All,
i am adding a reply very late to this topic, i am a new entrant to BIRT, trying to run a report from the commandline.
I am getting the same error, i use MsAccess as a database so created a jdbc bridge to connect to msaccess.
org.eclipse.birt.report.engine.api.ReportRunner readConfigurationFile
SEVERE: file: c:\ not exists!
i added the rt.JAR to the lib folder in the runtime, i use birt 4.2.2 version (latest).
Note: Though it throws an error in the command line the output file is generated in the folder. Still wanna execute it clean.
Any Help is appreciated
mwilliams
Are you able to run the test report?
http://wiki.eclipse.org/Birt_3.7_Migration_Guide#genReport_Command_Line