Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Integrated BIRT Report giving OCL errors(Errors while integrating BIRT report design to Java)
Integrated BIRT Report giving OCL errors [message #916375] Wed, 19 September 2012 00:16 Go to next message
Randy Evered is currently offline Randy EveredFriend
Messages: 16
Registered: July 2012
Junior Member
We have a BIRT report design that I am trying to integrate into a Java application so we can push a button and produce the report. The errors I am getting follow. We are using the OCL expression "self" with EMF Ecore Models in order to get at the meta model itself (like class and attribute information). See attached for the Java app.

Any help from the BIRT experts here would be greatly appreciated.

Thanks,
Randy

Sep 18, 2012 5:50:44 PM org.eclipse.birt.data.engine.odaconsumer.Connection prepareOdaQuery
SEVERE: Failed to prepare the following query for the data set type (org.eclipse.emf.oda.ecore.dataSet).
[self]
org.eclipse.datatools.connectivity.oda.OdaException ;
java.lang.NullPointerException
at org.eclipse.emf.oda.ecore.impl.Query.prepare(Query.java:155)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.doPrepare(OdaQuery.java:229)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.prepare(OdaQuery.java:186)
at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareOdaQuery(Connection.java:290)
at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareStatement(Connection.java:197)
at org.eclipse.birt.data.engine.executor.DataSource.prepareStatement(DataSource.java:302)
at org.eclipse.birt.data.engine.executor.DataSourceQuery.prepare(DataSourceQuery.java:281)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:442)
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:341)
at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:455)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:145)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:159)
at org.eclipse.birt.data.engine.impl.PreparedJointDataSourceQuery.populatePreparedQuery(PreparedJointDataSourceQuery.java:555)
at org.eclipse.birt.data.engine.impl.PreparedJointDataSourceQuery.populatePreparedQuery(PreparedJointDataSourceQuery.java:492)
at org.eclipse.birt.data.engine.impl.PreparedJointDataSourceQuery.access$2(PreparedJointDataSourceQuery.java:490)
at org.eclipse.birt.data.engine.impl.PreparedJointDataSourceQuery$JointDataSetQueryExecutor.createOdiQuery(PreparedJointDataSourceQuery.java:587)
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:325)
at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:455)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:159)
at org.eclipse.birt.data.engine.impl.PreparedJointDataSourceQuery.populatePreparedQuery(PreparedJointDataSourceQuery.java:555)
at org.eclipse.birt.data.engine.impl.PreparedJointDataSourceQuery.populatePreparedQuery(PreparedJointDataSourceQuery.java:492)
at org.eclipse.birt.data.engine.impl.PreparedJointDataSourceQuery.access$2(PreparedJointDataSourceQuery.java:490)
at org.eclipse.birt.data.engine.impl.PreparedJointDataSourceQuery$JointDataSetQueryExecutor.createOdiQuery(PreparedJointDataSourceQuery.java:587)
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:325)
at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:455)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178)
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:624)
at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:152)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:267)
at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1939)
at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at com.lmco.osf.col.birt.BIRTReportRunner.runReport(BIRTReportRunner.java:87)
at com.lmco.osf.col.birt.RunBirtReport$4.widgetSelected(RunBirtReport.java:179)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at com.lmco.osf.col.birt.RunBirtReport.runEventLoop(RunBirtReport.java:192)
at com.lmco.osf.col.birt.RunBirtReport.main(RunBirtReport.java:203)
Caused by: java.lang.NullPointerException
at org.eclipse.emf.oda.ecore.impl.Query.prepare(Query.java:147)
... 53 more
Report succeded.

==================================================================================
The output.html file contains:

The following items have errors:

Table (id = 14):
+ An exception occurred during processing. Please see the following message for details:
Failed to prepare the query execution for the data set: Class Data Set
Failed to prepare the following query for the data set type (org.eclipse.emf.oda.ecore.dataSet).
[self]
org.eclipse.datatools.connectivity.oda.OdaException ;
java.lang.NullPointerException (Element ID:14)

Re: Integrated BIRT Report giving OCL errors [message #916934 is a reply to message #916375] Wed, 19 September 2012 16:55 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Does the report work in the designer?

Jason
Re: Integrated BIRT Report giving OCL errors [message #917218 is a reply to message #916934] Wed, 19 September 2012 23:12 Go to previous messageGo to next message
Randy Evered is currently offline Randy EveredFriend
Messages: 16
Registered: July 2012
Junior Member
Yes, it is fine.

Randy
Re: Integrated BIRT Report giving OCL errors [message #917941 is a reply to message #917218] Thu, 20 September 2012 15:25 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Did you copy the emf oda runtime plugin to your deploy environment?

Jason
Re: Integrated BIRT Report giving OCL errors [message #917976 is a reply to message #917941] Thu, 20 September 2012 15:59 Go to previous messageGo to next message
Randy Evered is currently offline Randy EveredFriend
Messages: 16
Registered: July 2012
Junior Member
Jason,

Yes, I included org.eclipse.emf.oda.ecore in the list of dependencies for the package (among a bunch of others). I am guessing it has something to do with OCL being not supported somehow but I don't really know. I sure appreciate help. I am stuck on this now.

Thank you!
Randy
Re: Integrated BIRT Report giving OCL errors [message #919021 is a reply to message #917976] Fri, 21 September 2012 15:56 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Is your app an RCP app? What version of BIRT are you using and which emf oda did you download.

Jason
Re: Integrated BIRT Report giving OCL errors [message #919032 is a reply to message #919021] Fri, 21 September 2012 16:07 Go to previous messageGo to next message
Randy Evered is currently offline Randy EveredFriend
Messages: 16
Registered: July 2012
Junior Member
Jason,

The application is an SWT app, so it's short. There are two classes, one for the UI getting the input/output and data source file names plus the output format, and the other class which is what I posted, the BirtReportRunner. I have the DOC, HTML, XLS, and PDF emitters working correctly I believe, but the OCL query error is stopping the results.

I am using Juno. I attached a screen shot of the software installed. Looks like 4.2 of BIRT, and 1.1.0 of EMF ODA driver.

Thanks for your time,
Randy
Re: Integrated BIRT Report giving OCL errors [message #919095 is a reply to message #919032] Fri, 21 September 2012 17:21 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I am not very familiar with the emf ecore oda. Is this the method you used to install:
http://wiki.eclipse.org/Ecore_ODA_Driver
Any chance you can open a bugzilla entry on the DTP Project?

Jason
Re: Integrated BIRT Report giving OCL errors [message #919106 is a reply to message #919095] Fri, 21 September 2012 17:34 Go to previous messageGo to next message
Randy Evered is currently offline Randy EveredFriend
Messages: 16
Registered: July 2012
Junior Member
Jason,

No, I used to integrated Install Software method since the driver is now integrated with Eclipse.

I don't know how to open a bugzilla entry on the DTP Project. How does that work?

Thanks,
Randy
Re: Integrated BIRT Report giving OCL errors [message #919116 is a reply to message #919106] Fri, 21 September 2012 17:44 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You can log a bug on data tools here:
https://bugs.eclipse.org/bugs/enter_bug.cgi?classification=DataTools
I am trying to locate the source for the oda you are using. Do you know where it is?

Jason
Re: Integrated BIRT Report giving OCL errors [message #919133 is a reply to message #919116] Fri, 21 September 2012 18:06 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

BTW this error should not be reported to the DataTools project but the EMF project.

Jason
Re: Integrated BIRT Report giving OCL errors [message #919157 is a reply to message #919133] Fri, 21 September 2012 18:40 Go to previous messageGo to next message
Randy Evered is currently offline Randy EveredFriend
Messages: 16
Registered: July 2012
Junior Member
Hi Jason,

I created: https://bugs.eclipse.org/bugs/show_bug.cgi?id=390120

Hopefully they can help. Please add any comments to it you think are necessary.

Thanks again for your time,
Randy
Re: Integrated BIRT Report giving OCL errors [message #929640 is a reply to message #919157] Mon, 01 October 2012 16:23 Go to previous messageGo to next message
Randy Evered is currently offline Randy EveredFriend
Messages: 16
Registered: July 2012
Junior Member
That bug was marked invalid because I didn't include a reproducible example, so I put together an example and created another bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=390581

Thanks,
Randy
Re: Integrated BIRT Report giving OCL errors [message #931998 is a reply to message #929640] Wed, 03 October 2012 18:31 Go to previous messageGo to next message
Randy Evered is currently offline Randy EveredFriend
Messages: 16
Registered: July 2012
Junior Member
The solution was:

QueryDelegate.Factory.Registry.INSTANCE.put("http://www.eclipse.org/emf/2002/Ecore/OCL", new OCLQueryDelegateFactory.Global());

Works now!

Randy
Re: Integrated BIRT Report giving OCL errors [message #932084 is a reply to message #931998] Wed, 03 October 2012 20:25 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Thanks for updating.

Jason
Previous Topic:How to show Average in Cross Tab?
Next Topic:Birt Web Viewer Internationalization
Goto Forum:
  


Current Time: Thu Nov 27 11:02:33 GMT 2014

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

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