Trouble starting Birt engine in app
Dear all,<br />
I'm developping an application using Birt reporting tool 3.7.0. The Report engine should startup when the application is starting. This works fine in development with intelliJ but when the application is packaged and on production, the report engine stops starting because the IReportEngineFactory is null with no logs what so ever. The application build is managed with maven so jars are the same in dev and prod.<br />
<br />
Here is a snippet of the code for engine startup:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
log.info("STARTING BIRT ENGINE");
Platform.startup(new EngineConfig());
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);//returns null on production site
log.info("factory: '" + factory + "'");
engine = factory.createReportEngine(config);
engine.changeLogLevel(Level.FINEST);
log.info("BIRT ENGINE STARTED");
</pre>
<br />
Any insight accepted.<br />
<br />
Thanks
I'm developping an application using Birt reporting tool 3.7.0. The Report engine should startup when the application is starting. This works fine in development with intelliJ but when the application is packaged and on production, the report engine stops starting because the IReportEngineFactory is null with no logs what so ever. The application build is managed with maven so jars are the same in dev and prod.<br />
<br />
Here is a snippet of the code for engine startup:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
log.info("STARTING BIRT ENGINE");
Platform.startup(new EngineConfig());
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);//returns null on production site
log.info("factory: '" + factory + "'");
engine = factory.createReportEngine(config);
engine.changeLogLevel(Level.FINEST);
log.info("BIRT ENGINE STARTED");
</pre>
<br />
Any insight accepted.<br />
<br />
Thanks
0
Comments
-
<blockquote class='ipsBlockquote' data-author="'MALPI'" data-cid="92002" data-time="1323946779" data-date="15 December 2011 - 03:59 AM"><p>
Are you sure that the Platform is started? I think I had the same problem... And the failure was, that the platform didn't start up.<br /></p></blockquote>
That may be that. Is there any way to see if the platform has started properly?0 -
Set a try Catch block around the Platform...<br />
<br />
Like this:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
try{
Platform.startup(config);
logger.info("Platform started.");
}catch(Exception e){
System.exit(2);
logger.error(e.getMessage());
}
</pre>
I`m sure that I had the same Issue but dont know anymore how i solved it..0 -
<blockquote class='ipsBlockquote' data-author="'MALPI'" data-cid="92008" data-time="1323957693" data-date="15 December 2011 - 07:01 AM"><p>
Set a try Catch block around the Platform...<br />
<br />
Like this:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
try{
Platform.startup(config);
logger.info("Platform started.");
}catch(Exception e){
System.exit(2);
logger.error(e.getMessage());
}
</pre>
I`m sure that I had the same Issue but dont know anymore how i solved it..<br /></p></blockquote>
Well the platform seems to start correctly...<br />
Thanks for your help anyway!0 -
<blockquote class='ipsBlockquote' data-author="'Mad1s0n'" data-cid="92009" data-time="1323958619" data-date="15 December 2011 - 07:16 AM"><p>
Well the platform seems to start correctly...<br />
Thanks for your help anyway!<br /></p></blockquote>
<br />
No more ideas?0 -
<blockquote class='ipsBlockquote' data-author="'MALPI'" data-cid="92056" data-time="1324042523" data-date="16 December 2011 - 06:35 AM"><p>
Not Really, what do you set in your config File?!<br /></p></blockquote>
<br />
I have no config file really. I import all the jars needed by birt with maven. I modified the birt-runtime pom file to import all the jars. And I'm good to go. At least on dev environment...0 -
<blockquote class='ipsBlockquote' data-author="'Mad1s0n'" data-cid="92057" data-time="1324043880" data-date="16 December 2011 - 06:58 AM"><p>
I have no config file really. I import all the jars needed by birt with maven. I modified the birt-runtime pom file to import all the jars. And I'm good to go. At least on dev environment...<br /></p></blockquote>
<br />
Set up the config file and try to start the logger on LeVel.Fine. Maybe you get more Information on this way. At least how did you export the Jars? I have extracted them in a different Folder. Why did you modify the birt runtime file?!<br />
<br />
Cheers0 -
<blockquote class='ipsBlockquote' data-author="'MALPI'" data-cid="92154" data-time="1324112901" data-date="17 December 2011 - 02:08 AM"><p>
Set up the config file and try to start the logger on LeVel.Fine. Maybe you get more Information on this way. At least how did you export the Jars? I have extracted them in a different Folder. Why did you modify the birt runtime file?!<br />
<br />
Cheers<br /></p></blockquote>
<br />
What conf file are you talking about? I haven't seen any in birt 3.7 and therefore haven't set any.<br />
I tried to put this line of code:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>config.setLogConfig("c:/", Level.FINEST);</pre>
And again, it's working fine on dev environment, but nothing on production. No log file created.<br />
I downloaded the birt runtime zip file on the birt website, uploaded all the jars on a maven repository and declared all the jars in the birt runtime pom file so that in my app and all those that use birt, I just have to declare the birt runtime in the app pom file and all the needed jars are consequently added to the app libraries.<br />
<br />
I really appreciate your help0
Categories
- All Categories
- 117 Developer Announcements
- 52 Articles
- 145 General Questions
- 133 Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 912 Cloud Fax and Notifications
- 81 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 167 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 4 XM Fax