You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by shogo <sh...@poczta.onet.pl> on 2010/01/22 13:19:02 UTC

Eclipse BIRT as felix bundle

Is this possible ? Anyone tryied ?
When i'am trying to run birt on felix i'm getting an error.

My code:
EngineConfig config = new EngineConfig();
config.setEngineHome("ReportEngine");
Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory)
Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);

factory is not created. It looks like birt cant find his plugins.
Any ideas ?

-- 
View this message in context: http://old.nabble.com/Eclipse-BIRT-as-felix-bundle-tp27272395p27272395.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: Eclipse BIRT as felix bundle

Posted by Nick Wilson <ni...@card.co.uk>.
You shouldn't really need to modify the bundles. Might be worth trying
2.5.1. Also might be worth asking in the Eclipse forums as it's starting
up an equinox container and loading the BIRT bundles under that rather
than the enclosing felix container.

Nick

-----Original Message-----
From: shogo [mailto:shogun_soft@poczta.onet.pl] 
Sent: 25 January 2010 09:40
To: users@felix.apache.org
Subject: RE: Eclipse BIRT as felix bundle


BIRT 2.3.1 and felix 2.0.1
After adding org.xml.sax.helpers package to :
 org.osgi.framework.system.packages.extra and
org.osgi.framework.bootdelegation
in config.properties, and to Import-Package in bundle manifest, birt
says
that cant find class from another package, so i'm adding package by
package
right now.
Not sure this is right way.

(there is javax.xml_1.3.4.v200806030440.jar in birt plugins folder)

Michal.


Nick Wilson-9 wrote:
> 
> Which version of BIRT are you using? 2.5.1 works for me. It looks like
> your code is finding the Eclipse update configurator bundle ok
> (org.eclipse.update.configurator_3.3.0.v20090312.jar). That imports
the
> package "org.xml.sax.helpers" which it should find in the javax xml
> bundle in the same folder (javax.xml_1.3.4.v200902170245.jar).
> Not sure why it can't find that.
> 
> Nick
> 
> -----Original Message-----
> From: shogo [mailto:shogun_soft@poczta.onet.pl] 
> Sent: 25 January 2010 08:57
> To: users@felix.apache.org
> Subject: RE: Eclipse BIRT as felix bundle
> 
> 
> It doesnt works :/
> 
> Felix logs says nothing, but birt logs says(logs from
> C:\(...)\ReportEngine\configuration):
>
org.eclipse.update.internal.configurator.ConfigurationActivator.start()
> of
> bundle org.eclipse.update.configurator.
> 	at
>
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivato
> r(BundleContextImpl.java:1028)
> 	at
>
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleC
> ontextImpl.java:984)
> 	at
>
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHo
> st.java:346)
> 	at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractB
> undle.java:355)
> 	at
>
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framewor
> k.java:1074)
> 	at
>
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles
> (StartLevelManager.java:616)
> 	at
>
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Start
> LevelManager.java:508)
> 	at
>
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLev
> el(StartLevelManager.java:299)
> 	at
>
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent
> (StartLevelManager.java:489)
> 	at
>
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMana
> ger.java:211)
> 	at
>
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventMa
> nager.java:321)
> Caused by: java.lang.NoClassDefFoundError:
> org/xml/sax/helpers/DefaultHandler
> (...)
> 
> Exception is thrown when trying to open report design file:
> IReportRunnable reportRunnable = engine.openReportDesign(is); 
> 
> Exception returned from birt to my app(logs from my application):
> java.lang.NullPointerException
>           -      at
>
org.eclipse.birt.report.engine.api.ReportEngine.openReportDesign(ReportE
> ngine.java:126)
> 
> It looks like birt cant find class org.xml.sax.helpers.DefaultHandler.

> 
> Michal.
> 
> 
> Nick Wilson-9 wrote:
>> 
>> I've just got it working as a Glassfish v3 osgi bundle, so it should
>> work under other felix containers. 
>> (...)
>> I've created one bundle with the BIRT ReportEngine/lib folder jars
and
>> exported the API packages. I'm accessing that from another bundle
with
>> the above code.
>> Hope that helps.
>> 
>> Nick
>>  
>> 
> 
> -- 
> View this message in context:
>
http://old.nabble.com/Eclipse-BIRT-as-felix-bundle-tp27272395p27303642.h
> tml
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 

-- 
View this message in context:
http://old.nabble.com/Eclipse-BIRT-as-felix-bundle-tp27272395p27304133.h
tml
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: Eclipse BIRT as felix bundle

Posted by shogo <sh...@poczta.onet.pl>.
BIRT 2.3.1 and felix 2.0.1
After adding org.xml.sax.helpers package to :
 org.osgi.framework.system.packages.extra and
org.osgi.framework.bootdelegation
in config.properties, and to Import-Package in bundle manifest, birt says
that cant find class from another package, so i'm adding package by package
right now.
Not sure this is right way.

(there is javax.xml_1.3.4.v200806030440.jar in birt plugins folder)

Michal.


Nick Wilson-9 wrote:
> 
> Which version of BIRT are you using? 2.5.1 works for me. It looks like
> your code is finding the Eclipse update configurator bundle ok
> (org.eclipse.update.configurator_3.3.0.v20090312.jar). That imports the
> package "org.xml.sax.helpers" which it should find in the javax xml
> bundle in the same folder (javax.xml_1.3.4.v200902170245.jar).
> Not sure why it can't find that.
> 
> Nick
> 
> -----Original Message-----
> From: shogo [mailto:shogun_soft@poczta.onet.pl] 
> Sent: 25 January 2010 08:57
> To: users@felix.apache.org
> Subject: RE: Eclipse BIRT as felix bundle
> 
> 
> It doesnt works :/
> 
> Felix logs says nothing, but birt logs says(logs from
> C:\(...)\ReportEngine\configuration):
> org.eclipse.update.internal.configurator.ConfigurationActivator.start()
> of
> bundle org.eclipse.update.configurator.
> 	at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivato
> r(BundleContextImpl.java:1028)
> 	at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleC
> ontextImpl.java:984)
> 	at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHo
> st.java:346)
> 	at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractB
> undle.java:355)
> 	at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framewor
> k.java:1074)
> 	at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles
> (StartLevelManager.java:616)
> 	at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Start
> LevelManager.java:508)
> 	at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLev
> el(StartLevelManager.java:299)
> 	at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent
> (StartLevelManager.java:489)
> 	at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMana
> ger.java:211)
> 	at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventMa
> nager.java:321)
> Caused by: java.lang.NoClassDefFoundError:
> org/xml/sax/helpers/DefaultHandler
> (...)
> 
> Exception is thrown when trying to open report design file:
> IReportRunnable reportRunnable = engine.openReportDesign(is); 
> 
> Exception returned from birt to my app(logs from my application):
> java.lang.NullPointerException
>           -      at
> org.eclipse.birt.report.engine.api.ReportEngine.openReportDesign(ReportE
> ngine.java:126)
> 
> It looks like birt cant find class org.xml.sax.helpers.DefaultHandler. 
> 
> Michal.
> 
> 
> Nick Wilson-9 wrote:
>> 
>> I've just got it working as a Glassfish v3 osgi bundle, so it should
>> work under other felix containers. 
>> (...)
>> I've created one bundle with the BIRT ReportEngine/lib folder jars and
>> exported the API packages. I'm accessing that from another bundle with
>> the above code.
>> Hope that helps.
>> 
>> Nick
>>  
>> 
> 
> -- 
> View this message in context:
> http://old.nabble.com/Eclipse-BIRT-as-felix-bundle-tp27272395p27303642.h
> tml
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Eclipse-BIRT-as-felix-bundle-tp27272395p27304133.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: Eclipse BIRT as felix bundle

Posted by Nick Wilson <ni...@card.co.uk>.
Which version of BIRT are you using? 2.5.1 works for me. It looks like
your code is finding the Eclipse update configurator bundle ok
(org.eclipse.update.configurator_3.3.0.v20090312.jar). That imports the
package "org.xml.sax.helpers" which it should find in the javax xml
bundle in the same folder (javax.xml_1.3.4.v200902170245.jar).
Not sure why it can't find that.

Nick

-----Original Message-----
From: shogo [mailto:shogun_soft@poczta.onet.pl] 
Sent: 25 January 2010 08:57
To: users@felix.apache.org
Subject: RE: Eclipse BIRT as felix bundle


It doesnt works :/

Felix logs says nothing, but birt logs says(logs from
C:\(...)\ReportEngine\configuration):
org.eclipse.update.internal.configurator.ConfigurationActivator.start()
of
bundle org.eclipse.update.configurator.
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivato
r(BundleContextImpl.java:1028)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleC
ontextImpl.java:984)
	at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHo
st.java:346)
	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractB
undle.java:355)
	at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framewor
k.java:1074)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles
(StartLevelManager.java:616)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Start
LevelManager.java:508)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLev
el(StartLevelManager.java:299)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent
(StartLevelManager.java:489)
	at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMana
ger.java:211)
	at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventMa
nager.java:321)
Caused by: java.lang.NoClassDefFoundError:
org/xml/sax/helpers/DefaultHandler
(...)

Exception is thrown when trying to open report design file:
IReportRunnable reportRunnable = engine.openReportDesign(is); 

Exception returned from birt to my app(logs from my application):
java.lang.NullPointerException
          -      at
org.eclipse.birt.report.engine.api.ReportEngine.openReportDesign(ReportE
ngine.java:126)

It looks like birt cant find class org.xml.sax.helpers.DefaultHandler. 

Michal.


Nick Wilson-9 wrote:
> 
> I've just got it working as a Glassfish v3 osgi bundle, so it should
> work under other felix containers. 
> (...)
> I've created one bundle with the BIRT ReportEngine/lib folder jars and
> exported the API packages. I'm accessing that from another bundle with
> the above code.
> Hope that helps.
> 
> Nick
>  
> 

-- 
View this message in context:
http://old.nabble.com/Eclipse-BIRT-as-felix-bundle-tp27272395p27303642.h
tml
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: Eclipse BIRT as felix bundle

Posted by shogo <sh...@poczta.onet.pl>.
It doesnt works :/

Felix logs says nothing, but birt logs says(logs from
C:\(...)\ReportEngine\configuration):
org.eclipse.update.internal.configurator.ConfigurationActivator.start() of
bundle org.eclipse.update.configurator.
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1028)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
	at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:355)
	at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1074)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:616)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:299)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:489)
	at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:211)
	at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:321)
Caused by: java.lang.NoClassDefFoundError:
org/xml/sax/helpers/DefaultHandler
(...)

Exception is thrown when trying to open report design file:
IReportRunnable reportRunnable = engine.openReportDesign(is); 

Exception returned from birt to my app(logs from my application):
java.lang.NullPointerException
          -      at
org.eclipse.birt.report.engine.api.ReportEngine.openReportDesign(ReportEngine.java:126)

It looks like birt cant find class org.xml.sax.helpers.DefaultHandler. 

Michal.


Nick Wilson-9 wrote:
> 
> I've just got it working as a Glassfish v3 osgi bundle, so it should
> work under other felix containers. 
> (...)
> I've created one bundle with the BIRT ReportEngine/lib folder jars and
> exported the API packages. I'm accessing that from another bundle with
> the above code.
> Hope that helps.
> 
> Nick
>  
> 

-- 
View this message in context: http://old.nabble.com/Eclipse-BIRT-as-felix-bundle-tp27272395p27303642.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: Eclipse BIRT as felix bundle

Posted by Nick Wilson <ni...@card.co.uk>.
I've just got it working as a Glassfish v3 osgi bundle, so it should
work under other felix containers. I used the following code:

		EngineConfig config = new EngineConfig();
	
config.setEngineHome("C:/java/birt-runtime-2_5_1/ReportEngine");
		ReportEngine engine = new ReportEngine(config);
		InputStream is = getClass().getResourceAsStream(
				"example.rptdesign");
		try {
			IReportRunnable reportRunnable = engine
					.openReportDesign(is);
			IRunAndRenderTask task = engine
	
.createRunAndRenderTask(reportRunnable);
			task.getAppContext().put(
	
EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
					getClass().getClassLoader());

			PDFRenderOption options = new PDFRenderOption();
	
options.setOutputFileName("c:/target/example.pdf");
			options.setOutputFormat("pdf");

			task.setRenderOption(options);

			task.run();
			task.close();
			engine.destroy();
		} catch (EngineException e) {
			log.log(Level.SEVERE, e.getMessage(), e);
		}

I've created one bundle with the BIRT ReportEngine/lib folder jars and
exported the API packages. I'm accessing that from another bundle with
the above code.
Hope that helps.

Nick
 

-----Original Message-----
From: shogo [mailto:shogun_soft@poczta.onet.pl] 
Sent: 22 January 2010 12:19
To: users@felix.apache.org
Subject: Eclipse BIRT as felix bundle


Is this possible ? Anyone tryied ?
When i'am trying to run birt on felix i'm getting an error.

My code:
EngineConfig config = new EngineConfig();
config.setEngineHome("ReportEngine");
Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory)
Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGIN
E_FACTORY);

factory is not created. It looks like birt cant find his plugins.
Any ideas ?

-- 
View this message in context:
http://old.nabble.com/Eclipse-BIRT-as-felix-bundle-tp27272395p27272395.h
tml
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Eclipse BIRT as felix bundle

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Is the framework giving any errors?

-> richard

On 1/22/10 7:19, shogo wrote:
> Is this possible ? Anyone tryied ?
> When i'am trying to run birt on felix i'm getting an error.
>
> My code:
> EngineConfig config = new EngineConfig();
> config.setEngineHome("ReportEngine");
> Platform.startup(config);
> IReportEngineFactory factory = (IReportEngineFactory)
> Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
>
> factory is not created. It looks like birt cant find his plugins.
> Any ideas ?
>
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org