简体   繁体   中英

Viewing birt report that uses externalized connection profile

Getting the following error while viewing birt report using externalized connection profile.

org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
   ..............................
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.LinkageError: Failed to link org/eclipse/core/resources/IResource (Module "deployment.qv.war:main" from Service Module Loader)
   at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:437)
   at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:269)
   .......................................................
   at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:258)
   at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:269)
... 73 more
Caused by: java.lang.NoClassDefFoundError: org/eclipse/core/runtime/jobs/ISchedulingRule
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
   at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:353)
   at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:432)
... 113 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.jobs.ISchedulingRule from [Module "deployment.qv.war:main" from Service Module Loader]
   at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)

On beforeOpen script I have a the following script

var myresourcefolder = reportContext.getDesignHandle().getResourceFolder();
this.setExtensionProperty("OdaConnProfileStorePath", myresourcefolder + "/reports/reportName.cps")

I followed this while creating the report. What possibly could I be missing?

If you're using a task to have your report rendered, you can set the JDBC connection to it instead of having to configure each report to use it:

IReportRunnable runnable = engine.openReportDesign(design);
IRunAndRenderTask task = engine.createRunAndRenderTask(runnable);
//Where 'conn' is java.sql.Connection
task.getAppContext().put("OdaJDBCDriverPassInConnection", conn);
task.run();

See also:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM