Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Failed to load design in BIRT 2.6.2 runtime
Failed to load design in BIRT 2.6.2 runtime [message #832351] Fri, 30 March 2012 03:35 Go to next message
Lax Lloyd is currently offline Lax LloydFriend
Messages: 7
Registered: March 2012
Junior Member
We have number of eclipse BIRT 2.3.1 reports running fine in Production since 2008. Same reports fail in run time after upgrade to v2.6.2.

In runtime we invoke the custom ReportAdapter which extends DataSourceEventAdapter via Event handler class.

Code Snippet:
reportContext.getAppContext().put(
"org.eclipse.birt.report.data.oda.xml.inputStream",
//"org.eclipse.datatools.enablement.oda.xml.inputStream",
//new ByteArrayInputStream((ReportDefender.encoder().decode(new String(getBytesFromFile(xml)))).getBytes()));
new ByteArrayInputStream(getBytesFromFile(xml)));
reportContext.getAppContext().put("org.eclipse.birt.report.data.oda.xml.closeInputStream", new Boolean(true));

Existing Environment:
BIRT Runtime - 2.6.2, Sample WebViewer, JDK 1.5
Report DataSource XML

And the DataSet is build dynamically via eventhandler class. We are getting the below errors;

On Browser:
Table (id = 53):
- Can not load the report query: 53. Errors occurred when generating the report document for the report element with ID 53.
Error.ReportQueryLoadingError2 ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: Can not load the report query: 53. Errors occurred when generating the report document for the report element with ID 53.
at org.eclipse.birt.report.engine.data.dte.DataPresentationEngine.doExecuteQuery(DataPresentationEngine.java:164)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:265)
at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1890)
at org.eclipse.birt.report.engine.internal.document.v4.ReportItemExecutor.executeQuery(ReportItemExecutor.java:412)
at org.eclipse.birt.report.engine.internal.document.v4.TableItemExecutor.doExecute(TableItemExecutor.java:72)
at org.eclipse.birt.report.engine.internal.document.v4.ReportItemExecutor.execute(ReportItemExecutor.java:294)
at org.eclipse.birt.report.engine.internal.document.v4.ContainerExecutor.prepareChildExecutor(ContainerExecutor.java:226)

On Birt logs

Mar 29, 2012 2:20:34 PM org.eclipse.birt.report.engine.script.internal.ScriptExecutor
WARNING: Unhandled exception when executing script.
org.eclipse.birt.report.engine.api.EngineException: Unhandled exception when executing script.
at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:162)
at org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleInitialize(ReportScriptExecutor.java:53)
at org.eclipse.birt.report.engine.api.impl.EngineTask.loadDesign(EngineTask.java:1766)
at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:216)
at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:85)
at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1315)
....
Caused by: java.lang.ClassCastException: com.idl.maistro.report.adapter.ReportAdapter incompatible with org.eclipse.birt.report.engine.api.script.eventhandler.IReportEventHandler
at org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleInitialize(ReportScriptExecutor.java:46)
...
Mar 29, 2012 2:20:36 PM org.eclipse.birt.data.engine.odaconsumer.ConnectionManager openConnection
SEVERE: Unable to open connection.
org.eclipse.datatools.connectivity.oda.OdaException: Some connection properties are missing.
at org.eclipse.datatools.enablement.oda.xml.util.XMLSourceFromPath.<init>(XMLSourceFromPath.java:35)
at org.eclipse.datatools.enablement.oda.xml.util.XMLSourceFromPath.<init>(XMLSourceFromPath.java:42)
at org.eclipse.datatools.enablement.oda.xml.impl.Connection.open(Connection.java:87)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:250)
at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:165)
at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:224)

Attached the XML, XSD, Report Design and CSS

Thanks in advance
  • Attachment: Report.zip
    (Size: 14.02KB, Downloaded 222 times)
Re: Failed to load design in BIRT 2.6.2 runtime [message #832379 is a reply to message #832351] Fri, 30 March 2012 04:10 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You may want to try:
"org.eclipse.datatools.enablement.oda.xml.inputStream"

Did you mean to set the "new handler on each event" advanced property on
your data source? You may want to set that to false. If you are
re-using the same stream you also may need to reset the stream in the
beforeOpen of the data set.

Jason

On 3/29/2012 11:35 PM, Lax Lloyd wrote:
> We have number of eclipse BIRT 2.3.1 reports running fine in Production since 2008. Same reports fail in run time after upgrade to v2.6.2.
>
> In runtime we invoke the custom ReportAdapter which extends DataSourceEventAdapter via Event handler class.
>
> Code Snippet:
> reportContext.getAppContext().put(
> "org.eclipse.birt.report.data.oda.xml.inputStream",
> //"org.eclipse.datatools.enablement.oda.xml.inputStream",
> //new ByteArrayInputStream((ReportDefender.encoder().decode(new String(getBytesFromFile(xml)))).getBytes()));
> new ByteArrayInputStream(getBytesFromFile(xml)));
> reportContext.getAppContext().put("org.eclipse.birt.report.data.oda.xml.closeInputStream", new Boolean(true));
>
> Existing Environment:
> BIRT Runtime - 2.6.2, Sample WebViewer, JDK 1.5
> Report DataSource XML
>
> And the DataSet is build dynamically via eventhandler class. We are getting the below errors;
>
> On Browser:
> Table (id = 53):
> - Can not load the report query: 53. Errors occurred when generating the report document for the report element with ID 53.
> Error.ReportQueryLoadingError2 ( 1 time(s) )
> detail : org.eclipse.birt.report.engine.api.EngineException: Can not load the report query: 53. Errors occurred when generating the report document for the report element with ID 53.
> at org.eclipse.birt.report.engine.data.dte.DataPresentationEngine.doExecuteQuery(DataPresentationEngine.java:164)
> at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:265)
> at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1890)
> at org.eclipse.birt.report.engine.internal.document.v4.ReportItemExecutor.executeQuery(ReportItemExecutor.java:412)
> at org.eclipse.birt.report.engine.internal.document.v4.TableItemExecutor.doExecute(TableItemExecutor.java:72)
> at org.eclipse.birt.report.engine.internal.document.v4.ReportItemExecutor.execute(ReportItemExecutor.java:294)
> at org.eclipse.birt.report.engine.internal.document.v4.ContainerExecutor.prepareChildExecutor(ContainerExecutor.java:226)
>
> On Birt logs
>
> Mar 29, 2012 2:20:34 PM org.eclipse.birt.report.engine.script.internal.ScriptExecutor
> WARNING: Unhandled exception when executing script.
> org.eclipse.birt.report.engine.api.EngineException: Unhandled exception when executing script.
> at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:162)
> at org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleInitialize(ReportScriptExecutor.java:53)
> at org.eclipse.birt.report.engine.api.impl.EngineTask.loadDesign(EngineTask.java:1766)
> at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:216)
> at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:85)
> at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1315)
> ....
> Caused by: java.lang.ClassCastException: com.idl.maistro.report.adapter.ReportAdapter incompatible with org.eclipse.birt.report.engine.api.script.eventhandler.IReportEventHandler
> at org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleInitialize(ReportScriptExecutor.java:46)
> ...
> Mar 29, 2012 2:20:36 PM org.eclipse.birt.data.engine.odaconsumer.ConnectionManager openConnection
> SEVERE: Unable to open connection.
> org.eclipse.datatools.connectivity.oda.OdaException: Some connection properties are missing.
> at org.eclipse.datatools.enablement.oda.xml.util.XMLSourceFromPath.<init>(XMLSourceFromPath.java:35)
> at org.eclipse.datatools.enablement.oda.xml.util.XMLSourceFromPath.<init>(XMLSourceFromPath.java:42)
> at org.eclipse.datatools.enablement.oda.xml.impl.Connection.open(Connection.java:87)
> at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:250)
> at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:165)
> at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:224)
>
> Attached the XML, XSD, Report Design and CSS
>
> Thanks in advance
Re: Failed to load design in BIRT 2.6.2 runtime [message #832410 is a reply to message #832379] Fri, 30 March 2012 05:24 Go to previous messageGo to next message
Lax Lloyd is currently offline Lax LloydFriend
Messages: 7
Registered: March 2012
Junior Member
Thanks Jason for looking into this issue.

I tried your suggestion; I get the below error now;

Mar 30, 2012 1:13:08 AM org.eclipse.birt.data.engine.odaconsumer.ConnectionManager openConnection
SEVERE: Unable to open connection.
org.eclipse.datatools.connectivity.oda.OdaException: Some connection properties are missing.
at org.eclipse.datatools.enablement.oda.xml.util.XMLSourceFromPath.<init>(XMLSourceFromPath.java:35)
at org.eclipse.datatools.enablement.oda.xml.util.XMLSourceFromPath.<init>(XMLSourceFromPath.java:42)
at org.eclipse.datatools.enablement.oda.xml.impl.Connection.open(Connection.java:87)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:250)
at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:165)
at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:224)
at org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java:212)
at org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiDataSource(DataSourceRuntime.java:208)
at org.eclipse.birt.data.engine.impl.QueryExecutor.openDataSource(QueryExecutor.java:406)
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:316)
at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:455)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)

One thing i tried on the attached report design is, i tried to remove the last table section and the report ran fine in runtime and the ReportAdapter Class is invoked via EventHandles Class. However without removing this section, report runs perfectly fine in Production on 2.3.1. This is only an issue on 2.6.1

And the specific section only has the grouping, aggregate and computation function.There are 5 such report that fails in 2.6.2 but runs perfectly on 2.3.1.

Re: Failed to load design in BIRT 2.6.2 runtime [message #832422 is a reply to message #832410] Fri, 30 March 2012 05:41 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you try removing each field in the bottom table one at a time, to
see if you can further locate the issue? Make sure to remove the
binding (Properties->binding tab) for it as well.

Jason

On 3/30/2012 1:24 AM, Lax Lloyd wrote:
> Thanks Jason for looking into this issue.
>
> I tried your suggestion; I get the below error now;
>
> Mar 30, 2012 1:13:08 AM
> org.eclipse.birt.data.engine.odaconsumer.ConnectionManager openConnection
> SEVERE: Unable to open connection.
> org.eclipse.datatools.connectivity.oda.OdaException: Some connection
> properties are missing.
> at
> org.eclipse.datatools.enablement.oda.xml.util.XMLSourceFromPath.<init>(XMLSourceFromPath.java:35)
>
> at
> org.eclipse.datatools.enablement.oda.xml.util.XMLSourceFromPath.<init>(XMLSourceFromPath.java:42)
>
> at
> org.eclipse.datatools.enablement.oda.xml.impl.Connection.open(Connection.java:87)
>
> at
> org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:250)
>
> at
> org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:165)
>
> at
> org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:224)
>
> at
> org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java:212)
> at
> org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiDataSource(DataSourceRuntime.java:208)
>
> at
> org.eclipse.birt.data.engine.impl.QueryExecutor.openDataSource(QueryExecutor.java:406)
>
> at
> org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:316)
>
> at
> org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:455)
>
> at
> org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)
>
>
> One thing i tried on the attached report design is, i tried to remove
> the last table section and the report ran fine in runtime and the
> ReportAdapter Class is invoked via EventHandles Class. However without
> removing this section, report runs perfectly fine in Production on
> 2.3.1. This is only an issue on 2.6.1
>
> And the specific section only has the grouping, aggregate and
> computation function.There are 5 such report that fails in 2.6.2 but
> runs perfectly on 2.3.1.
>
>
Re: Failed to load design in BIRT 2.6.2 runtime [message #832810 is a reply to message #832422] Fri, 30 March 2012 16:07 Go to previous messageGo to next message
Lax Lloyd is currently offline Lax LloydFriend
Messages: 7
Registered: March 2012
Junior Member
Jason,

Looks like the join DataSet within the BIRT is causing the issue in 2.6.2. Only the bottom table in the attached report is binded to the Inner Join Dataset. If i bind it to the different dataset then report runs fine. Is there a specific defect in this version for using join dataset in BIRT?

Earlier i attached the report design, sample XML & XSD for your reference.

Lax
Re: Failed to load design in BIRT 2.6.2 runtime [message #832896 is a reply to message #832810] Fri, 30 March 2012 18:28 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I do not have your report adapter class, but if I remove the class from
the datasource all the datasets work.

Jason

On 3/30/2012 12:07 PM, Lax Lloyd wrote:
> Jason,
> Looks like the join DataSet within the BIRT is causing the issue in
> 2.6.2. Only the bottom table in the attached report is binded to the
> Inner Join Dataset. If i bind it to the different dataset then report
> runs fine. Is there a specific defect in this version for using join
> dataset in BIRT?
> Earlier i attached the report design, sample XML & XSD for your reference.
>
> Lax
Re: Failed to load design in BIRT 2.6.2 runtime [message #832917 is a reply to message #832896] Fri, 30 March 2012 18:57 Go to previous messageGo to next message
Lax Lloyd is currently offline Lax LloydFriend
Messages: 7
Registered: March 2012
Junior Member
Jason, Please find attached the report adapter.Also note that the report runs fine on 2.6.2 report designer. It is only an issue running it in BIRT runtime(Sample WebViewer) i.e. loading the xml on the fly using EventHandler Class.



Re: Failed to load design in BIRT 2.6.2 runtime [message #832922 is a reply to message #832896] Fri, 30 March 2012 19:03 Go to previous messageGo to next message
Lax Lloyd is currently offline Lax LloydFriend
Messages: 7
Registered: March 2012
Junior Member
This is the exception i get at the runtime;

Error.UnhandledScriptError ( 2 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: Unhandled exception when executing script.
at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:162)
at org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleInitialize(ReportScriptExecutor.java:53)
at org.eclipse.birt.report.engine.api.impl.EngineTask.loadDesign(EngineTask.java:1766)
at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:266)

....

Caused by: java.lang.ClassCastException: com.idl.maistro.report.adapter.ReportAdapter incompatible with org.eclipse.birt.report.engine.api.script.eventhandler.IReportEventHandler at org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleInitialize(ReportScriptExecutor.java:46)
... 61 more

Re: Failed to load design in BIRT 2.6.2 runtime [message #832942 is a reply to message #832922] Fri, 30 March 2012 19:22 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

This is a bit strange. do you have an event handler on the report?
Other than the data source? As a test can you remove:

<property name="newHandlerOnEachEvent">true</property>

Jason

On 3/30/2012 3:03 PM, Lax Lloyd wrote:
> This is the exception i get at the runtime;
>
> Error.UnhandledScriptError ( 2 time(s) )
> detail : org.eclipse.birt.report.engine.api.EngineException: Unhandled
> exception when executing script.
> at
> org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:162)
>
> at
> org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleInitialize(ReportScriptExecutor.java:53)
>
> at
> org.eclipse.birt.report.engine.api.impl.EngineTask.loadDesign(EngineTask.java:1766)
>
> at
> org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:266)
>
>
> ....
>
> Caused by: java.lang.ClassCastException:
> com.idl.maistro.report.adapter.ReportAdapter incompatible with
> org.eclipse.birt.report.engine.api.script.eventhandler.IReportEventHandler
> at
> org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleInitialize(ReportScriptExecutor.java:46)
>
> ... 61 more
>
>
Re: Failed to load design in BIRT 2.6.2 runtime [message #832979 is a reply to message #832942] Fri, 30 March 2012 20:22 Go to previous messageGo to next message
Lax Lloyd is currently offline Lax LloydFriend
Messages: 7
Registered: March 2012
Junior Member
No, I'm not using the eventhandler on the report, i'm using it only for dynamic loading of XML as datasource.

removign the property didn't help.
<property name="newHandlerOnEachEvent">true</property>

Still having same issue.
Re: Failed to load design in BIRT 2.6.2 runtime [message #833007 is a reply to message #832979] Fri, 30 March 2012 21:15 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

And you got the same stack trace?

Jason

On 3/30/2012 4:22 PM, Lax Lloyd wrote:
> No, I'm not using the eventhandler on the report, i'm using it only for
> dynamic loading of XML as datasource.
> removign the property didn't help. <property
> name="newHandlerOnEachEvent">true</property>
>
> Still having same issue.
Re: Failed to load design in BIRT 2.6.2 runtime [message #833047 is a reply to message #833007] Fri, 30 March 2012 22:37 Go to previous messageGo to next message
Lax Lloyd is currently offline Lax LloydFriend
Messages: 7
Registered: March 2012
Junior Member
Yes, same stack trace.
Re: Failed to load design in BIRT 2.6.2 runtime [message #835674 is a reply to message #833047] Tue, 03 April 2012 14:29 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

If you do not use the event handler class I assume the report works fine
deployed?

Jason

On 3/30/2012 6:37 PM, Lax Lloyd wrote:
> Yes, same stack trace.
Previous Topic:Use external browser to preview reports on case-by-case basis
Next Topic:BIRT and Buckminster
Goto Forum:
  


Current Time: Mon Oct 25 11:51:57 GMT 2021

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

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

Back to the top