Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » birt runtime 2.6 dependencies
icon4.gif  birt runtime 2.6 dependencies [message #556958] Fri, 03 September 2010 11:01 Go to next message
Dirk  is currently offline Dirk Friend
Messages: 3
Registered: July 2010
Junior Member
Hi BIRT users,

Just downloaded the latest BIRT runtime distribution.
What confuses me is that most of the dependent libs exist twice in the distribution. The command line demo creates its classpath from i think strange jars in the lib folder and the plugin folder contains all the stuff again and a lot more.

Why not only use the well named OSGI bundles ?
Why are some plugins packaged as jars and some as folders ?

If I try to embed the report engine api in my RCP application the dependency path forces me to include all sorts of apache batik jars. isn't the use of SVG graphics optional ?
As far as I can see the command line demo does not have batik in its classpath.

It really confuses me that there is no way for me to see, what plugins are exactly required, if I only want to produce PDF for example.

Am I missing something ? Any help appreciated.

Regards,
Dirk
Re: birt runtime 2.6 dependencies [message #557043 is a reply to message #556958] Fri, 03 September 2010 17:19 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Dirk,

Thanks for the comments. We are currently looking at ways to improve
the runtime. So any suggestions you have would be good to get in a
bugzilla entry. Some of the reasons for having the lib and plugins
content is because ultimately the runtime has to be able to run in a
webapp, RCP app or a standard Java app. In some cases for example the
birt api bundle is a system framework bundle that exposes the birt api
jar from the lib to the OSGi environment. This made it easier to deploy
to both environments. Generally if the bundle is not jarred is because
we wanted it to be easier for users to make changes to the bundle. For
example the jdbc plugin allows users to add drivers to the bundle.
Having a list of required plugins for a specific case I think would be a
good enhancement, but it is difficult as there would have to be a lot of
list. Do the users need charting, do they need xml datasource, if they
are only doing pdf will it support SVG charts, etc.

One thing that we could improve on is marking optional bundle
requirements, which may help a little.

I hope this does not sound like a long winded excuse and please offer
any suggestions for improvement.

Jason


On 9/3/2010 7:01 AM, Dirk wrote:
> Hi BIRT users,
>
> Just downloaded the latest BIRT runtime distribution.
> What confuses me is that most of the dependent libs exist twice in the
> distribution. The command line demo creates its classpath from i think
> strange jars in the lib folder and the plugin folder contains all the
> stuff again and a lot more.
>
> Why not only use the well named OSGI bundles ?
> Why are some plugins packaged as jars and some as folders ?
>
> If I try to embed the report engine api in my RCP application the
> dependency path forces me to include all sorts of apache batik jars.
> isn't the use of SVG graphics optional ?
> As far as I can see the command line demo does not have batik in its
> classpath.
>
> It really confuses me that there is no way for me to see, what plugins
> are exactly required, if I only want to produce PDF for example.
>
> Am I missing something ? Any help appreciated.
>
> Regards,
> Dirk
>
Re: birt runtime 2.6 dependencies [message #557281 is a reply to message #557043] Mon, 06 September 2010 12:39 Go to previous messageGo to next message
Dirk  is currently offline Dirk Friend
Messages: 3
Registered: July 2010
Junior Member
Hi Jason,

Thanks for your quick response. Meanwhile I managed to integrate the BIRT runtime into my RCP app. I had to add
30 additional jars with a total of 38 megs in order to be able to produce a PDF. Compared to JasperReports for example this seems quite a lot to me.

In my - maybe naive - thinking I image adding just one plugin dependency to my project determined by the output format I would like to produce.
In my case I would add the
"org.eclipse.birt.report.engine.emitter.pdf" bundle and eclipse could compute all the transitive dependencies automatically. Which this approach it should be possible to tell the requirements for a certain output format. In the moment this approach gives me a lot of stuff that i think is not needed at runtime.

But anyway. Since the runtime zip also contains the non osgi jars of the runtime I thought I could try to write a unit test which generates me some simple PDF. I was not able to do so,
because the code internally tries to setup an OSGI runtime, which did not work in my simple test. So BIRT seems to use the plugins always - even when running witin a standard java app.

Can you point me an example unit test code somewhere ?

Regards,
Dirk
Re: birt runtime 2.6 dependencies [message #557467 is a reply to message #557281] Tue, 07 September 2010 14:11 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Dirk,

Thanks for the comments. This is exactly what we are trying to improve.
I believe the source tree contains unit test for pdf generation in the
org.eclipse.birt.report.engine.emitter.pdf.test plugin. If you have
your BIRT plugins already as part of your application you can also write
a simple class to test it. Make sure you set BIRT Home to "" (double
quote empty string) and it should run.


EngineConfig config = new EngineConfig();
config.setBIRTHome("");

try{


// Create the report engine
IReportEngineFactory factory = (IReportEngineFactory)
org.eclipse.birt.core.framework.Platform
.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
IReportEngine engine = factory.createReportEngine( config );

IReportRunnable design = null;

//use this if the report is in the bundle
//Bundle bundle =
org.eclipse.core.runtime.Platform.getBundle("org.eclipse.birt.examples.rcpengine ");

//URL url = FileLocator.find(bundle, new
Path("/reports/TopNPercent.rptdesign"), null);
//String rpt = FileLocator.toFileURL(url).getPath();

//add to the classpath
//System.setProperty( EngineConstants.WEBAPP_CLASSPATH_KEY,
//"c:/myclasses" );
//config.setProperty(EngineConstants.WEBAPP_CLASSPATH_KEY,
"c:/myclasses");

design = engine.openReportDesign("locationtoreport");

IRunAndRenderTask task = engine.createRunAndRenderTask(design);

PDFRenderOption pdfOptions = new PDFRenderOption( options );
options.setOutputFileName("locationandfiletosave");
pdfOptions.setOption(IPDFRenderOption.PAGE_OVERFLOW,
IPDFRenderOption.FIT_TO_PAGE_SIZE);
pdfOptions .setOutputFormat("pdf");
task.setRenderOption(pdfOptions );
task.run();
}catch( Exception ex){
ex.printStackTrace();
}

Jason

On 9/6/2010 8:39 AM, Dirk wrote:
> Hi Jason,
>
> Thanks for your quick response. Meanwhile I managed to integrate the
> BIRT runtime into my RCP app. I had to add
> 30 additional jars with a total of 38 megs in order to be able to
> produce a PDF. Compared to JasperReports for example this seems quite a
> lot to me.
>
> In my - maybe naive - thinking I image adding just one plugin dependency
> to my project determined by the output format I would like to produce.
> In my case I would add the "org.eclipse.birt.report.engine.emitter.pdf"
> bundle and eclipse could compute all the transitive dependencies
> automatically. Which this approach it should be possible to tell the
> requirements for a certain output format. In the moment this approach
> gives me a lot of stuff that i think is not needed at runtime.
>
> But anyway. Since the runtime zip also contains the non osgi jars of the
> runtime I thought I could try to write a unit test which generates me
> some simple PDF. I was not able to do so,
> because the code internally tries to setup an OSGI runtime, which did
> not work in my simple test. So BIRT seems to use the plugins always -
> even when running witin a standard java app.
>
> Can you point me an example unit test code somewhere ?
>
> Regards,
> Dirk
Previous Topic: Connection profile store location
Next Topic:Table x-axis - Weekday Sorting
Goto Forum:
  


Current Time: Fri Apr 19 00:49:24 GMT 2024

Powered by FUDForum. Page generated in 0.01882 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top