Trouble starting Birt engine in app

Mad1s0n
edited February 11, 2022 in Analytics #1
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

Comments

  • mwilliams
    edited December 31, 1969 #2
    What is the code you're using?
    Warning No formatter is installed for the format ipb
  • Mad1s0n
    edited December 31, 1969 #3
    <blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="91979" data-time="1323904975" data-date="14 December 2011 - 04:22 PM"><p>
    What is the code you're using?<br /></p></blockquote>
    I'm sorry, what code are you referring to?
  • MALPI
    edited December 31, 1969 #4
    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.
  • Mad1s0n
    edited December 31, 1969 #5
    <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?
  • MALPI
    edited December 15, 2011 #6
    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..
  • Mad1s0n
    edited December 31, 1969 #7
    <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!
  • Mad1s0n
    edited December 31, 1969 #8
    <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?
  • MALPI
    edited December 31, 1969 #9
    Not Really, what do you set in your config File?!
  • Mad1s0n
    edited December 31, 1969 #10
    <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...
  • MALPI
    edited December 31, 1969 #11
    <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 />
    Cheers
  • Mad1s0n
    edited December 19, 2011 #12
    <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 help
  • mwilliams
    edited December 31, 1969 #13
    I was talking about the code that you use to start the platform, start the engine, and run the design.
    Warning No formatter is installed for the format ipb