Home
Designing Analytics Reports
BIRT DEAPI - Report Query fails on iHub16.0.1
Migrateduser
<p>Hi, </p>
<p> </p>
<p>Any idea when this exeption would happen. The following lines work fine in earlier iHub(3.*) version started failing in the latest iHub 16.0.1. It fails at the line marked in red.</p>
<p> </p>
<div>dataSetMetaHandle = reportContext.getDesignHandle().findDataSet("metaDataSet"); //Find Existing Data Set</div>
<div> </div>
<div>var myconfig = reportContext.getReportRunnable().getReportEngine().getConfig();</div>
<div>queryDefinition = new QueryDefinition( true );</div>
<div>queryDefinition.setDataSetName( dataSetMetaHandle.getName() );</div>
<div> </div>
<div>mySession = DataRequestSession.newSession(myconfig, new DataSessionContext(DataSessionContext.MODE_DIRECT_PRESENTATION));</div>
<div>mySession.defineDataSource(mySession.getModelAdaptor().adaptDataSource(dataSetMetaHandle.getDataSource()));</div>
<div>mySession.defineDataSet(mySession.getModelAdaptor().adaptDataSet(dataSetMetaHandle));</div>
<div> </div>
<div><span style="color:#ff0000;">var pq = mySession.prepare( queryDefinition );</span></div>
<div> </div>
<div> </div>
<div><span style="color:#000000;">This is the exception we see it in the server log:</span></div>
<div> </div>
<div> </div>
<div>loader constraint violation: when resolving interface method "org.eclipse.datatools.connectivity.oda.IQuery.setSpecification(Lorg/eclipse/datatools/connectivity/oda/spec/QuerySpecification;)V" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/eclipse/birt/data/engine/odaconsumer/Connection, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for the method's defining class, org/eclipse/datatools/connectivity/oda/IQuery, have different Class objects for the type org/eclipse/datatools/connectivity/oda/spec/QuerySpecification used in the signature</div>
<div> at org.eclipse.birt.report.engine.javascript.JavascriptEngine.evaluate(JavascriptEngine.java:295)</div>
<div> at org.eclipse.birt.core.script.ScriptContext.evaluate(ScriptContext.java:159)</div>
<div> at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:789)</div>
<div> at org.eclipse.birt.report.engine.executor.ExecutionContext.evaluate(ExecutionContext.java:718)</div>
<div> at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.handleScriptInternal(ScriptExecutor.java:118)</div>
<div> at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.handleScript(ScriptExecutor.java:105)</div>
<div> at org.eclipse.birt.report.engine.script.internal.ReportScriptExecutor.handleBeforeFactory(ReportScriptExecutor.java:114)</div>
<div> ... 12 more</div>
<div>Caused by: java.lang.LinkageError: loader constraint violation: when resolving interface method "org.eclipse.datatools.connectivity.oda.IQuery.setSpecification(Lorg/eclipse/datatools/connectivity/oda/spec/QuerySpecification;)V" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/eclipse/birt/data/engine/odaconsumer/Connection, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for the method's defining class, org/eclipse/datatools/connectivity/oda/IQuery, have different Class objects for the type org/eclipse/datatools/connectivity/oda/spec/QuerySpecification used in the signature</div>
<div> at org.eclipse.birt.data.engine.odaconsumer.Connection.setOdaQuerySpec(Connection.java:318)</div>
<div> at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareOdaQuery(Connection.java:288)</div>
<div> at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareStatement(Connection.java:197)</div>
<div> at org.eclipse.birt.data.engine.executor.DataSource.prepareStatement(DataSource.java:302)</div>
<div> at org.eclipse.birt.data.engine.executor.DataSourceQuery.prepare(DataSourceQuery.java:296)</div>
<div> at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:621)</div>
<div> at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:349)</div>
<div> at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:463)</div>
<div> </div>
Find more posts tagged with
Comments
There are no comments yet