Skip to main content



      Home
Home » Archived » BIRT » XML DataSource
XML DataSource [message #128670] Sat, 11 February 2006 07:41 Go to next message
Eclipse UserFriend
Originally posted by: rui.gil.com

Hello,

I'm trying to integrate BIRT in a java application. I'm using a specified
xml file for instance data in the report designer and everything is fine,
but how can I specify the XML DataSource a runtime ? I would like to pass
the XML Data as a stream, is it possible ?

Rui Gil
Re: XML DataSource [message #128737 is a reply to message #128670] Sat, 11 February 2006 15:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: doug_porter.dailyaccess.nospam.com

Totally doable in 2.0. Fixed in this bug report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=122865

Do something like so:
//After you have set up your report and are ready to actually run
//the report via a RunAndRender task, do this:

Map m = new HashMap();

//myInputStream is your input stream of XML data
m.put("org.eclipse.birt.report.data.oda.xml.inputStream", myInputStream);
m.put("org.eclipse.birt.report.data.oda.xml.closeInputStream ", new Boolean(true));

// Create the RunAndRender task
IRunAndRenderTask task = engine.createRunAndRenderTask(report);

//Previously defined render options....
task.setRenderOption(options);

//Set our app context so it know to use our stream
task.setAppContext(m);

task.run();

//Viola!

Doug Porter
DailyAccess Corporation

"Rui Gil" <rui@gil.com> wrote in message news:dskm24$gfk$1@utils.eclipse.org...
>
> Hello,
>
> I'm trying to integrate BIRT in a java application. I'm using a specified
> xml file for instance data in the report designer and everything is fine,
> but how can I specify the XML DataSource a runtime ? I would like to pass
> the XML Data as a stream, is it possible ?
>
> Rui Gil
Re: XML DataSource [message #129197 is a reply to message #128737] Mon, 13 February 2006 10:29 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the answer. Apparently, this could work, but I've got some
strange error that I believe is happening before the actual rendering, in
the model parsing phase.

The Engine is tryng to parse the model (the oda.xml extension) and booms
with an NPE ! Any idea why this could happen ?

Id: java.lang.NullPointerException
Callstack:

org.eclipse.datatools.connectivity.oda.util.manifest.Manifes tExplorer. <clinit>()
line:47

org.eclipse.birt.data.oda.util.manifest.DtpManifestExplorer. getInstance()
line:56

org.eclipse.birt.report.model.extension.oda.ODAManifestUtil. getDataSourceExtension()
line:42

org.eclipse.birt.report.model.parser.OdaDataSourceState.pars eODADataSourceExtensionID()
line:105


Rui Gil
Re: XML DataSource [message #129281 is a reply to message #129197] Mon, 13 February 2006 11:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: doug_porter.dailyaccess.nospam.com

Could you post the code you are using to call the report and indicate the line where it is blowing up?

Doug Porter
DailyAccess Corporation

"Rui Gil" <rui.gil@inov.pt> wrote in message news:8bdc75e132b5b0bd33320123f202d4a0$1@www.eclipse.org...
> Thanks for the answer. Apparently, this could work, but I've got some
> strange error that I believe is happening before the actual rendering, in
> the model parsing phase.
>
> The Engine is tryng to parse the model (the oda.xml extension) and booms
> with an NPE ! Any idea why this could happen ?
>
> Id: java.lang.NullPointerException
> Callstack:
>
> org.eclipse.datatools.connectivity.oda.util.manifest.Manifes tExplorer. <clinit>()
> line:47
>
> org.eclipse.birt.data.oda.util.manifest.DtpManifestExplorer. getInstance()
> line:56
>
> org.eclipse.birt.report.model.extension.oda.ODAManifestUtil. getDataSourceExtension()
> line:42
>
> org.eclipse.birt.report.model.parser.OdaDataSourceState.pars eODADataSourceExtensionID()
> line:105
>
>
> Rui Gil
>
Re: XML DataSource [message #129331 is a reply to message #129281] Mon, 13 February 2006 12:12 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the help, but I've tryed the code you supplied outside my
framework and it works ! Althought with some warnings...

WARNING: Cannot set statement property.
java.lang.UnsupportedOperationException: IQuery.setProperty( String
propertyName, String propertyValue )
at
org.eclipse.datatools.connectivity.oda.consumer.helper.OdaOb ject.handleUnsupportedOp(OdaObject.java:278)

This means that the problem is in the interaction between BIRT and my
framework, so I have to dig a little deeper... :)

Rui Gil
Re: XML DataSource [message #131440 is a reply to message #129281] Thu, 16 February 2006 09:37 Go to previous message
Eclipse UserFriend
Originally posted by: rigel.inov.intranet

I've managed to trak down the NPE. It was a classloader issue, related to
bug #126073, but now the XML Data Stream doesn't work properly. If I have
more that one dataset it starts to give saxparser exceptions. I suspect
that this is a bug from the XMLDataInputStream trying to reopening the
stream over an over...

As anynone in BIRT come across this ?

Doug Porter wrote:

> Could you post the code you are using to call the report and indicate the
> line where it is blowing up?
>
> Doug Porter
> DailyAccess Corporation
>
> "Rui Gil" <rui.gil@inov.pt> wrote in message
> news:8bdc75e132b5b0bd33320123f202d4a0$1@www.eclipse.org...
>> Thanks for the answer. Apparently, this could work, but I've got some
>> strange error that I believe is happening before the actual rendering, in
>> the model parsing phase.
>>
>> The Engine is tryng to parse the model (the oda.xml extension) and booms
>> with an NPE ! Any idea why this could happen ?
>>
>> Id: java.lang.NullPointerException
>> Callstack:
>>
>>
org.eclipse.datatools.connectivity.oda.util.manifest.Manifes tExplorer. <clinit>()
>> line:47
>>
>> org.eclipse.birt.data.oda.util.manifest.DtpManifestExplorer. getInstance()
>> line:56
>>
>>
org.eclipse.birt.report.model.extension.oda.ODAManifestUtil. getDataSourceExtension()
>> line:42
>>
>>
org.eclipse.birt.report.model.parser.OdaDataSourceState.pars eODADataSourceExtensionID()
>> line:105
>>
>>
>> Rui Gil
>>
Previous Topic:Y-axis not correct numbering
Next Topic:Nightly Build cannot be loaded
Goto Forum:
  


Current Time: Sun Jun 08 18:57:39 EDT 2025

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

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

Back to the top