Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Creating a BIRT plugin?
Creating a BIRT plugin? [message #485479] Fri, 11 September 2009 21:21 Go to next message
Eclipse UserFriend
Originally posted by: ddd.asd.com

I am using the PDE framework to create a BIRT plugin. Its basically just a
button that creates a .rptdesign file when the user presses the button and
supplies a XML file (used as dataSource) as input to a filechooser box. But
when a .rptdesign file is created the Birt Runtime is used.

My idea was to make the whole Birt Runtime as a jar file and wrap it into a
plugin using the PDE tools. But is this the best approach or are the some
better way to create the above plugin?
Re: Creating a BIRT plugin? [message #485480 is a reply to message #485479] Fri, 11 September 2009 21:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ddd.asd.com

Basically my problem is that I have made and application that creates a
..rptdesign file but when the last line below is executed:

designConfig.setProperty("BIRT_HOME", engineDir);
...
...

designEngine = designFactory.createDesignEngine(designConfig);



nothing happens. The application is wrapped into a plugin and used in a PDE
plugin. I have made the wrapped application as a fat jar so all the birt
library files are included. Maybe it has something to do with 'engineDir'.
This string is referring to the location of the BIRT ReportEngine but I am
not sure this makes sense inside a plugin...

Any ideas are most welcome!


"klm" <ddd@asd.com> wrote in message news:h8ef1a$rm2$1@build.eclipse.org...
>I am using the PDE framework to create a BIRT plugin. Its basically just a
>button that creates a .rptdesign file when the user presses the button and
>supplies a XML file (used as dataSource) as input to a filechooser box. But
>when a .rptdesign file is created the Birt Runtime is used.
>
> My idea was to make the whole Birt Runtime as a jar file and wrap it into
> a plugin using the PDE tools. But is this the best approach or are the
> some better way to create the above plugin?
Re: Creating a BIRT plugin? [message #485731 is a reply to message #485480] Mon, 14 September 2009 17:00 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

If you are building an RCP/Eclipse based application and already have
the BIRT plugins loaded you can set the BIRT_HOME to "" and you do not
have to include the runtime at all, because it is already there.

Jason

klm wrote:
> Basically my problem is that I have made and application that creates a
> .rptdesign file but when the last line below is executed:
>
> designConfig.setProperty("BIRT_HOME", engineDir);
> ...
> ...
>
> designEngine = designFactory.createDesignEngine(designConfig);
>
>
>
> nothing happens. The application is wrapped into a plugin and used in a
> PDE plugin. I have made the wrapped application as a fat jar so all the
> birt library files are included. Maybe it has something to do with
> 'engineDir'. This string is referring to the location of the BIRT
> ReportEngine but I am not sure this makes sense inside a plugin...
>
> Any ideas are most welcome!
>
>
> "klm" <ddd@asd.com> wrote in message news:h8ef1a$rm2$1@build.eclipse.org...
>> I am using the PDE framework to create a BIRT plugin. Its basically
>> just a button that creates a .rptdesign file when the user presses the
>> button and supplies a XML file (used as dataSource) as input to a
>> filechooser box. But when a .rptdesign file is created the Birt
>> Runtime is used.
>>
>> My idea was to make the whole Birt Runtime as a jar file and wrap it
>> into a plugin using the PDE tools. But is this the best approach or
>> are the some better way to create the above plugin?
>
Re: Creating a BIRT plugin? [message #485765 is a reply to message #485731] Mon, 14 September 2009 21:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ddd.asd.com

I have now tried:





designConfig = new DesignConfig();
reportConfig = new EngineConfig();
try {

designConfig.setProperty("BIRT_HOME", "");
IDesignEngineFactory designFactory = (IDesignEngineFactory)
Platform.createFactoryObject (
IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY );

designEngine = designFactory.createDesignEngine(designConfig);




But the last line gives a NullPointerException.



I have also tried adding:

Platform.startup( designConfig );

after:

designConfig.setProperty("BIRT_HOME", "");


But then I get:

org.eclipse.birt.core.exception.BirtException: Cant startup the OSGI
framework
at org.eclipse.birt.core.framework.Platform.startup(Platform.ja va:91)
....
....


Cant startup the OSGI framework.





My BIRT PDF Plugin project contains the following dependencies (from the
MANIFEST.MF file):

org.eclipse.ui
org.eclipse.core.runtime
org.eclipse.birt.core(2.5.0)
org.eclipse.birt.report.engine(2.5.0)
org.eclipse.birt.report.model.adapter.oda(2.5.0)
PDE_wrap(1.0.0)



where PDE_wrap is the application (that creates the ReportDesignHandle)
wrapped to a PDE plugin. Any ideas?












"Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
news:h8lspk$d36$2@build.eclipse.org...
> If you are building an RCP/Eclipse based application and already have the
> BIRT plugins loaded you can set the BIRT_HOME to "" and you do not have to
> include the runtime at all, because it is already there.
>
> Jason
>
> klm wrote:
>> Basically my problem is that I have made and application that creates a
>> .rptdesign file but when the last line below is executed:
>>
>> designConfig.setProperty("BIRT_HOME", engineDir);
>> ...
>> ...
>>
>> designEngine = designFactory.createDesignEngine(designConfig);
>>
>>
>>
>> nothing happens. The application is wrapped into a plugin and used in a
>> PDE plugin. I have made the wrapped application as a fat jar so all the
>> birt library files are included. Maybe it has something to do with
>> 'engineDir'. This string is referring to the location of the BIRT
>> ReportEngine but I am not sure this makes sense inside a plugin...
>>
>> Any ideas are most welcome!
>>
>>
>> "klm" <ddd@asd.com> wrote in message
>> news:h8ef1a$rm2$1@build.eclipse.org...
>>> I am using the PDE framework to create a BIRT plugin. Its basically just
>>> a button that creates a .rptdesign file when the user presses the button
>>> and supplies a XML file (used as dataSource) as input to a filechooser
>>> box. But when a .rptdesign file is created the Birt Runtime is used.
>>>
>>> My idea was to make the whole Birt Runtime as a jar file and wrap it
>>> into a plugin using the PDE tools. But is this the best approach or are
>>> the some better way to create the above plugin?
>>
Re: Creating a BIRT plugin? [message #485775 is a reply to message #485765] Mon, 14 September 2009 21:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ddd.asd.com

I have now moved the dependencies to the PDE wrapped jar (which is
included as a dependency in the main PDE plugin project) and now it does not
give the previous error.

To make this call:

session = designEngine.newSessionHandle(ULocale.ENGLISH); // never

work I had to include:

com.ibm : icu 4.0.1





"klm" <ddd@asd.com> wrote in message news:h8mbo4$75q$1@build.eclipse.org...
>I have now tried:
>
>
>
>
>
> designConfig = new DesignConfig();
> reportConfig = new EngineConfig();
> try {
>
> designConfig.setProperty("BIRT_HOME", "");
> IDesignEngineFactory designFactory = (IDesignEngineFactory)
> Platform.createFactoryObject (
> IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY );
>
> designEngine = designFactory.createDesignEngine(designConfig);
>
>
>
>
> But the last line gives a NullPointerException.
>
>
>
> I have also tried adding:
>
> Platform.startup( designConfig );
>
> after:
>
> designConfig.setProperty("BIRT_HOME", "");
>
>
> But then I get:
>
> org.eclipse.birt.core.exception.BirtException: Cant startup the OSGI
> framework
> at org.eclipse.birt.core.framework.Platform.startup(Platform.ja va:91)
> ...
> ...
>
>
> Cant startup the OSGI framework.
>
>
>
>
>
> My BIRT PDF Plugin project contains the following dependencies (from the
> MANIFEST.MF file):
>
> org.eclipse.ui
> org.eclipse.core.runtime
> org.eclipse.birt.core(2.5.0)
> org.eclipse.birt.report.engine(2.5.0)
> org.eclipse.birt.report.model.adapter.oda(2.5.0)
> PDE_wrap(1.0.0)
>
>
>
> where PDE_wrap is the application (that creates the ReportDesignHandle)
> wrapped to a PDE plugin. Any ideas?
>
>
>
>
>
>
>
>
>
>
>
>
> "Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
> news:h8lspk$d36$2@build.eclipse.org...
>> If you are building an RCP/Eclipse based application and already have the
>> BIRT plugins loaded you can set the BIRT_HOME to "" and you do not have
>> to include the runtime at all, because it is already there.
>>
>> Jason
>>
>> klm wrote:
>>> Basically my problem is that I have made and application that creates a
>>> .rptdesign file but when the last line below is executed:
>>>
>>> designConfig.setProperty("BIRT_HOME", engineDir);
>>> ...
>>> ...
>>>
>>> designEngine = designFactory.createDesignEngine(designConfig);
>>>
>>>
>>>
>>> nothing happens. The application is wrapped into a plugin and used in a
>>> PDE plugin. I have made the wrapped application as a fat jar so all the
>>> birt library files are included. Maybe it has something to do with
>>> 'engineDir'. This string is referring to the location of the BIRT
>>> ReportEngine but I am not sure this makes sense inside a plugin...
>>>
>>> Any ideas are most welcome!
>>>
>>>
>>> "klm" <ddd@asd.com> wrote in message
>>> news:h8ef1a$rm2$1@build.eclipse.org...
>>>> I am using the PDE framework to create a BIRT plugin. Its basically
>>>> just a button that creates a .rptdesign file when the user presses the
>>>> button and supplies a XML file (used as dataSource) as input to a
>>>> filechooser box. But when a .rptdesign file is created the Birt Runtime
>>>> is used.
>>>>
>>>> My idea was to make the whole Birt Runtime as a jar file and wrap it
>>>> into a plugin using the PDE tools. But is this the best approach or are
>>>> the some better way to create the above plugin?
>>>
>
Re: Creating a BIRT plugin? [message #485909 is a reply to message #485775] Tue, 15 September 2009 14:03 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Is it working now?

klm wrote:
> I have now moved the dependencies to the PDE wrapped jar (which is
> included as a dependency in the main PDE plugin project) and now it does
> not
> give the previous error.
>
> To make this call:
>
> session = designEngine.newSessionHandle(ULocale.ENGLISH); // never
>
> work I had to include:
>
> com.ibm : icu 4.0.1
>
>
>
>
>
> "klm" <ddd@asd.com> wrote in message news:h8mbo4$75q$1@build.eclipse.org...
>> I have now tried:
>>
>>
>>
>>
>>
>> designConfig = new DesignConfig();
>> reportConfig = new EngineConfig();
>> try {
>>
>> designConfig.setProperty("BIRT_HOME", "");
>> IDesignEngineFactory designFactory = (IDesignEngineFactory)
>> Platform.createFactoryObject (
>> IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY );
>>
>> designEngine = designFactory.createDesignEngine(designConfig);
>>
>>
>>
>>
>> But the last line gives a NullPointerException.
>>
>>
>>
>> I have also tried adding:
>>
>> Platform.startup( designConfig );
>>
>> after:
>>
>> designConfig.setProperty("BIRT_HOME", "");
>>
>>
>> But then I get:
>>
>> org.eclipse.birt.core.exception.BirtException: Cant startup the OSGI
>> framework
>> at org.eclipse.birt.core.framework.Platform.startup(Platform.ja va:91)
>> ...
>> ...
>>
>>
>> Cant startup the OSGI framework.
>>
>>
>>
>>
>>
>> My BIRT PDF Plugin project contains the following dependencies (from
>> the MANIFEST.MF file):
>>
>> org.eclipse.ui
>> org.eclipse.core.runtime
>> org.eclipse.birt.core(2.5.0)
>> org.eclipse.birt.report.engine(2.5.0)
>> org.eclipse.birt.report.model.adapter.oda(2.5.0)
>> PDE_wrap(1.0.0)
>>
>>
>>
>> where PDE_wrap is the application (that creates the
>> ReportDesignHandle) wrapped to a PDE plugin. Any ideas?
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> "Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
>> news:h8lspk$d36$2@build.eclipse.org...
>>> If you are building an RCP/Eclipse based application and already have
>>> the BIRT plugins loaded you can set the BIRT_HOME to "" and you do
>>> not have to include the runtime at all, because it is already there.
>>>
>>> Jason
>>>
>>> klm wrote:
>>>> Basically my problem is that I have made and application that
>>>> creates a .rptdesign file but when the last line below is executed:
>>>>
>>>> designConfig.setProperty("BIRT_HOME", engineDir);
>>>> ...
>>>> ...
>>>>
>>>> designEngine = designFactory.createDesignEngine(designConfig);
>>>>
>>>>
>>>>
>>>> nothing happens. The application is wrapped into a plugin and used
>>>> in a PDE plugin. I have made the wrapped application as a fat jar so
>>>> all the birt library files are included. Maybe it has something to
>>>> do with 'engineDir'. This string is referring to the location of the
>>>> BIRT ReportEngine but I am not sure this makes sense inside a plugin...
>>>>
>>>> Any ideas are most welcome!
>>>>
>>>>
>>>> "klm" <ddd@asd.com> wrote in message
>>>> news:h8ef1a$rm2$1@build.eclipse.org...
>>>>> I am using the PDE framework to create a BIRT plugin. Its basically
>>>>> just a button that creates a .rptdesign file when the user presses
>>>>> the button and supplies a XML file (used as dataSource) as input to
>>>>> a filechooser box. But when a .rptdesign file is created the Birt
>>>>> Runtime is used.
>>>>>
>>>>> My idea was to make the whole Birt Runtime as a jar file and wrap
>>>>> it into a plugin using the PDE tools. But is this the best approach
>>>>> or are the some better way to create the above plugin?
>>>>
>>
>
Re: Creating a BIRT plugin? [message #485993 is a reply to message #485909] Tue, 15 September 2009 20:30 Go to previous message
Eclipse UserFriend
Originally posted by: asd.asd.com

Yes all the dependencies needs to be made on the wrapped jar (application
jar). Next this wrapped jar can be made a dependency in the main plugin.

As long as I make sure to add the engine, model and the icu dependencies to
the application jar I don't need to specify a path to the birt report
engine.






"Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
news:h8o6n9$glt$1@build.eclipse.org...
> Is it working now?
>
> klm wrote:
>> I have now moved the dependencies to the PDE wrapped jar (which is
>> included as a dependency in the main PDE plugin project) and now it does
>> not
>> give the previous error.
>>
>> To make this call:
>>
>> session = designEngine.newSessionHandle(ULocale.ENGLISH); // never
>>
>> work I had to include:
>>
>> com.ibm : icu 4.0.1
>>
>>
>>
>>
>>
>> "klm" <ddd@asd.com> wrote in message
>> news:h8mbo4$75q$1@build.eclipse.org...
>>> I have now tried:
>>>
>>>
>>>
>>>
>>>
>>> designConfig = new DesignConfig();
>>> reportConfig = new EngineConfig();
>>> try {
>>>
>>> designConfig.setProperty("BIRT_HOME", "");
>>> IDesignEngineFactory designFactory = (IDesignEngineFactory)
>>> Platform.createFactoryObject (
>>> IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY );
>>>
>>> designEngine = designFactory.createDesignEngine(designConfig);
>>>
>>>
>>>
>>>
>>> But the last line gives a NullPointerException.
>>>
>>>
>>>
>>> I have also tried adding:
>>>
>>> Platform.startup( designConfig );
>>>
>>> after:
>>>
>>> designConfig.setProperty("BIRT_HOME", "");
>>>
>>>
>>> But then I get:
>>>
>>> org.eclipse.birt.core.exception.BirtException: Cant startup the OSGI
>>> framework
>>> at org.eclipse.birt.core.framework.Platform.startup(Platform.ja va:91)
>>> ...
>>> ...
>>>
>>>
>>> Cant startup the OSGI framework.
>>>
>>>
>>>
>>>
>>>
>>> My BIRT PDF Plugin project contains the following dependencies (from the
>>> MANIFEST.MF file):
>>>
>>> org.eclipse.ui
>>> org.eclipse.core.runtime
>>> org.eclipse.birt.core(2.5.0)
>>> org.eclipse.birt.report.engine(2.5.0)
>>> org.eclipse.birt.report.model.adapter.oda(2.5.0)
>>> PDE_wrap(1.0.0)
>>>
>>>
>>>
>>> where PDE_wrap is the application (that creates the ReportDesignHandle)
>>> wrapped to a PDE plugin. Any ideas?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> "Jason Weathersby" <jasonweathersby@windstream.net> wrote in message
>>> news:h8lspk$d36$2@build.eclipse.org...
>>>> If you are building an RCP/Eclipse based application and already have
>>>> the BIRT plugins loaded you can set the BIRT_HOME to "" and you do not
>>>> have to include the runtime at all, because it is already there.
>>>>
>>>> Jason
>>>>
>>>> klm wrote:
>>>>> Basically my problem is that I have made and application that creates
>>>>> a .rptdesign file but when the last line below is executed:
>>>>>
>>>>> designConfig.setProperty("BIRT_HOME", engineDir);
>>>>> ...
>>>>> ...
>>>>>
>>>>> designEngine = designFactory.createDesignEngine(designConfig);
>>>>>
>>>>>
>>>>>
>>>>> nothing happens. The application is wrapped into a plugin and used in
>>>>> a PDE plugin. I have made the wrapped application as a fat jar so all
>>>>> the birt library files are included. Maybe it has something to do with
>>>>> 'engineDir'. This string is referring to the location of the BIRT
>>>>> ReportEngine but I am not sure this makes sense inside a plugin...
>>>>>
>>>>> Any ideas are most welcome!
>>>>>
>>>>>
>>>>> "klm" <ddd@asd.com> wrote in message
>>>>> news:h8ef1a$rm2$1@build.eclipse.org...
>>>>>> I am using the PDE framework to create a BIRT plugin. Its basically
>>>>>> just a button that creates a .rptdesign file when the user presses
>>>>>> the button and supplies a XML file (used as dataSource) as input to a
>>>>>> filechooser box. But when a .rptdesign file is created the Birt
>>>>>> Runtime is used.
>>>>>>
>>>>>> My idea was to make the whole Birt Runtime as a jar file and wrap it
>>>>>> into a plugin using the PDE tools. But is this the best approach or
>>>>>> are the some better way to create the above plugin?
>>>>>
>>>
>>
Previous Topic:Data item expressions from a library
Next Topic:Disable "Preloading" of reports (pages)
Goto Forum:
  


Current Time: Fri Apr 26 09:37:56 GMT 2024

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

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

Back to the top