Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Get a java.lang.NoClassDefFoundError while running the report generation
boj
I'm doing a plugin that generates reports but I get a java.lang.NoClassDefFoundError: org/eclipse/datatools/connectivity/oda/util/ResourceIdentifiers when running report generation. I'm using BIRT 2.3.1 with Eclipse Ganymede. Any idea?<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
public boolean generate() {
EngineConfig config = null;
IReportRunnable runnable = null;
//Setting config
config = new EngineConfig();
// Setting platform
try {
Platform.startup( config );
} catch (BirtException be) {
be.printStackTrace();
return false;
}
// Create a factory for report engines
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
// Creating engine for reports
IReportEngine engine = factory.createReportEngine( config );
// Opening a source for report generation
try {
runnable = engine.openReportDesign( getDesignPath() );
} catch (EngineException ee) {
ee.printStackTrace();
return false;
}
// Create a run and render task object
IRunAndRenderTask task = engine.createRunAndRenderTask(runnable);
// Set render options
RenderOption options = getRenderOption();
// Apply the rendering options to the task
task.setRenderOption( options );
// Generating the report
try {
task.run();
} catch (EngineException ee) {
ee.printStackTrace();
return false;
}
return true;
}
</pre>
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask doRun
GRAVE: Error happened while running the report.
java.lang.NoClassDefFoundError: org/eclipse/datatools/connectivity/oda/util/ResourceIdentifiers
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.createResourceIdentifiers(DataRequestSessionImpl.java:1071)
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.setModuleHandleToAppContext(DataRequestSessionImpl.java:1199)
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.setModuleHandleToAppContext(DataRequestSessionImpl.java:1183)
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.<init>(DataRequestSessionImpl.java:140)
at org.eclipse.birt.report.data.adapter.impl.DataAdapterFactory.createSession(DataAdapterFactory.java:30)
at org.eclipse.birt.report.data.adapter.api.DataRequestSession.newSession(DataRequestSession.java:78)
at org.eclipse.birt.report.data.adapter.api.DataRequestSession.newSession(DataRequestSession.java:61)
at org.eclipse.birt.report.engine.data.dte.DteDataEngine.<init>(DteDataEngine.java:74)
at org.eclipse.birt.report.engine.data.DataEngineFactory.createDataEngine(DataEngineFactory.java:101)
at org.eclipse.birt.report.engine.executor.ExecutionContext.openDataEngine(ExecutionContext.java:758)
at org.eclipse.birt.report.engine.executor.ExecutionContext.getDataEngine(ExecutionContext.java:779)
at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:109)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:59)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplciateReportExecutor.execute(SuppressDuplciateReportExecutor.java:51)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:59)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:149)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:72)
at my.plugin.util.ReportGenerator.generate(Unknown Source)
</pre>
Find more posts tagged with
Comments
boj
I have the problem solved. The jar file I get in first place was mistaken (the file I needed wasn't there).
Thnx.