Skip to main content



      Home
Home » Archived » BIRT » "ClassNotFoundException" while using a ScriptedDataSource and the BIRT-API
"ClassNotFoundException" while using a ScriptedDataSource and the BIRT-API [message #361809] Wed, 16 April 2008 09:22 Go to next message
Eclipse UserFriend
Hello,

i'm trying to use BIRT for building reports of an existing EJB-project.
Therefor i build an .reportDesign-File that uses a simple
ScriptedDataSource named "SylagenScriptedDataSetHandlerMini". That
DataSource is writen in Java and just contains 2 Arrays with some integer
and string values. The Report then just prints out the Array-Data in an
table. That works just fine in the ReportDesigner where i can preview the
correct results. I now tried to invoke the build of reports through the
BIRT-api from an other java-file called "ReportExecutor.java". But even
with all parameters and libarys set in this eclipse project i always get a
ClassNotFoundException when my java-file tries to invoke the RunTask.
Right now i use a RunAndRenderTask but i also tried to seperate RunTask
and RenderTask and got the same Error while starting the seperated
RunTask. In both cases the report is build anyway but the table is not
filled witha ny informations because the connection to the dataSource is
not working over the API.
I hope someone can give me a hint what i'm doing wrong. The exact error is
printed out as:

16.04.2008 15:04:02
org.eclipse.birt.report.engine.script.internal.ScriptExecuto r getInstance
WARNUNG:
de.uni_due.s3.sylagen.prototypes.reporting.SylagenScriptedDa taSetHandlerMini
java.lang.ClassNotFoundException:
de.uni_due.s3.sylagen.prototypes.reporting.SylagenScriptedDa taSetHandlerMini
at java.lang.ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:429)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.birt.report.engine.executor.ExecutionContext$App licationClassLoader.loadClass(ExecutionContext.java:1527)
at
org.eclipse.birt.report.engine.script.internal.ScriptExecuto r.getInstance(ScriptExecutor.java:129)
at
org.eclipse.birt.report.engine.script.internal.DataSetScript Executor.initEventHandler(DataSetScriptExecutor.java:49)
at
org.eclipse.birt.report.engine.script.internal.ScriptDataSet ScriptExecutor.initEventHandler(ScriptDataSetScriptExecutor. java:47)
at
org.eclipse.birt.report.engine.script.internal.DataSetScript Executor. <init>(DataSetScriptExecutor.java:39)
at
org.eclipse.birt.report.engine.script.internal.ScriptDataSet ScriptExecutor. <init>(ScriptDataSetScriptExecutor.java:42)
at
org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.ne wScriptDataSet(ModelDteApiAdapter.java:553)
at
org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.cr eateDataSetDesign(ModelDteApiAdapter.java:208)
at
org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.do DefineDataSet(ModelDteApiAdapter.java:276)
at
org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.de fineDataSet(ModelDteApiAdapter.java:235)
at
org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.p repare(AbstractDataEngine.java:106)
at
org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:94)
at
org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportExecutor.execute(WrappedReportExecutor.java:59)
at
org.eclipse.birt.report.engine.internal.executor.dup.Suppres sDuplciateReportExecutor.execute(SuppressDuplciateReportExec utor.java:51)
at
org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportExecutor.execute(WrappedReportExecutor.java:59)
at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR un(RunAndRenderTask.java:138)
at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:68)
at
de.uni_due.s3.sylagen.prototypes.reporting.ReportExecutor.ex ecuteReportNoParams(ReportExecutor.java:157)
at
de.uni_due.s3.sylagen.prototypes.reporting.ReportExecutor.ex ecuteReport(ReportExecutor.java:181)
at
de.uni_due.s3.sylagen.prototypes.reporting.ReportExecutor.ma in(ReportExecutor.java:238)


Thx,

Rafael
Re: "ClassNotFoundException" while using a ScriptedDataSource and the BIRT-API [message #361814 is a reply to message #361809] Wed, 16 April 2008 11:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Rafael,

In your code that runs the reports, verify that you have the APPCONTEXT
Classloader key set.

HashMap context = new HashMap( );
context.put( EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
yourclassthatrunsthereport.class.getClassLoader( ) );

runTask.setAppContext( context );


Jason

Rafael Weiss wrote:
> Hello,
>
> i'm trying to use BIRT for building reports of an existing EJB-project.
> Therefor i build an .reportDesign-File that uses a simple
> ScriptedDataSource named "SylagenScriptedDataSetHandlerMini". That
> DataSource is writen in Java and just contains 2 Arrays with some
> integer and string values. The Report then just prints out the
> Array-Data in an table. That works just fine in the ReportDesigner where
> i can preview the correct results. I now tried to invoke the build of
> reports through the BIRT-api from an other java-file called
> "ReportExecutor.java". But even with all parameters and libarys set in
> this eclipse project i always get a ClassNotFoundException when my
> java-file tries to invoke the RunTask. Right now i use a
> RunAndRenderTask but i also tried to seperate RunTask and RenderTask and
> got the same Error while starting the seperated RunTask. In both cases
> the report is build anyway but the table is not filled witha ny
> informations because the connection to the dataSource is not working
> over the API. I hope someone can give me a hint what i'm doing wrong.
> The exact error is printed out as:
>
> 16.04.2008 15:04:02
> org.eclipse.birt.report.engine.script.internal.ScriptExecuto r getInstance
> WARNUNG:
> de.uni_due.s3.sylagen.prototypes.reporting.SylagenScriptedDa taSetHandlerMini
>
> java.lang.ClassNotFoundException:
> de.uni_due.s3.sylagen.prototypes.reporting.SylagenScriptedDa taSetHandlerMini
>
> at java.lang.ClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:429)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:369)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:357)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
>
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.eclipse.birt.report.engine.executor.ExecutionContext$App licationClassLoader.loadClass(ExecutionContext.java:1527)
>
> at
> org.eclipse.birt.report.engine.script.internal.ScriptExecuto r.getInstance(ScriptExecutor.java:129)
>
> at
> org.eclipse.birt.report.engine.script.internal.DataSetScript Executor.initEventHandler(DataSetScriptExecutor.java:49)
>
> at
> org.eclipse.birt.report.engine.script.internal.ScriptDataSet ScriptExecutor.initEventHandler(ScriptDataSetScriptExecutor. java:47)
>
> at
> org.eclipse.birt.report.engine.script.internal.DataSetScript Executor. <init>(DataSetScriptExecutor.java:39)
>
> at
> org.eclipse.birt.report.engine.script.internal.ScriptDataSet ScriptExecutor. <init>(ScriptDataSetScriptExecutor.java:42)
>
> at
> org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.ne wScriptDataSet(ModelDteApiAdapter.java:553)
>
> at
> org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.cr eateDataSetDesign(ModelDteApiAdapter.java:208)
>
> at
> org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.do DefineDataSet(ModelDteApiAdapter.java:276)
>
> at
> org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.de fineDataSet(ModelDteApiAdapter.java:235)
>
> at
> org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.p repare(AbstractDataEngine.java:106)
>
> at
> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:94)
>
> at
> org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportExecutor.execute(WrappedReportExecutor.java:59)
>
> at
> org.eclipse.birt.report.engine.internal.executor.dup.Suppres sDuplciateReportExecutor.execute(SuppressDuplciateReportExec utor.java:51)
>
> at
> org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportExecutor.execute(WrappedReportExecutor.java:59)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR un(RunAndRenderTask.java:138)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:68)
>
> at
> de.uni_due.s3.sylagen.prototypes.reporting.ReportExecutor.ex ecuteReportNoParams(ReportExecutor.java:157)
>
> at
> de.uni_due.s3.sylagen.prototypes.reporting.ReportExecutor.ex ecuteReport(ReportExecutor.java:181)
>
> at
> de.uni_due.s3.sylagen.prototypes.reporting.ReportExecutor.ma in(ReportExecutor.java:238)
>
>
>
> Thx,
>
> Rafael
>
Re: "ClassNotFoundException" while using a ScriptedDataSource and the BIRT-API [message #361852 is a reply to message #361814] Fri, 18 April 2008 04:23 Go to previous message
Eclipse UserFriend
Hello Jason .. that really helped to solve my problem.

Thx a lot!

Rafael
Previous Topic:example for custom parameters form
Next Topic:How to execute an extension point
Goto Forum:
  


Current Time: Wed Sep 24 03:07:02 EDT 2025

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

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

Back to the top