NoClassDefFoundError - org/mozilla/javascript/Scriptable [message #156027] |
Tue, 25 April 2006 09:44  |
Eclipse User |
|
|
|
Hi all,
I have taken sample code from site. Than I changed it alitle for my code.
When I run my program I take an error "[ERROR][DialogExceptionHandler]
java.lang.NoClassDefFoundError: org/mozilla/javascript/Scriptable".
It gives error for "ReportEngine engine = new ReportEngine( config )"
I can't understand the reason. My code is below;
EngineConfig config = new EngineConfig();
config.setEngineHome( "C:/birtruntime/birt-runtime-2_0_1/Report Engine"
);
//Create the report engine
ReportEngine engine = new ReportEngine( config );
//Open a report design - use design to modify design, retrieve embedded
images etc.
IReportRunnable design =
engine.openReportDesign(" C:/devtools/eclipse/workspace/Intranet/src/com/sample/intran et/server/report/chart/lineChart.rptdesign ");
//Create task to run the report - use the task to execute and run the
report,
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
//Set Render context to handle url and image locataions
HTMLRenderContext renderContext = new HTMLRenderContext();
//renderContext.setImageDirectory("image");
HashMap contextMap = new HashMap();
contextMap.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,
renderContext );
task.setAppContext( contextMap );
//Set rendering options - such as file or stream output,
//output format, whether it is embeddable, etc
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFileName("c:/work/test/test.html");
options.setOutputFormat("html");
task.setRenderOption(options);
//run the report and destroy the engine
task.run();
engine.destroy();
|
|
|
Re: NoClassDefFoundError - org/mozilla/javascript/Scriptable [message #156162 is a reply to message #156027] |
Tue, 25 April 2006 12:10  |
Eclipse User |
|
|
|
Make sure you have js.jar in your classpath.
Make sure you have the jars under the Report Engine directory in your
classpath.
Jason
"Onder" <onderulker@gmail.com> wrote in message
news:648b3e29131aef36696aaa48d1efefad$1@www.eclipse.org...
> Hi all,
> I have taken sample code from site. Than I changed it alitle for my code.
> When I run my program I take an error "[ERROR][DialogExceptionHandler]
> java.lang.NoClassDefFoundError: org/mozilla/javascript/Scriptable".
> It gives error for "ReportEngine engine = new ReportEngine( config )"
>
> I can't understand the reason. My code is below;
>
> EngineConfig config = new EngineConfig();
> config.setEngineHome( "C:/birtruntime/birt-runtime-2_0_1/Report Engine" );
> //Create the report engine
> ReportEngine engine = new ReportEngine( config );
>
> //Open a report design - use design to modify design, retrieve embedded
> images etc. IReportRunnable design =
> engine.openReportDesign(" C:/devtools/eclipse/workspace/Intranet/src/com/sample/intran et/server/report/chart/lineChart.rptdesign ");
> //Create task to run the report - use the task to execute and run the
> report,
> IRunAndRenderTask task = engine.createRunAndRenderTask(design);
> //Set Render context to handle url and image locataions
> HTMLRenderContext renderContext = new HTMLRenderContext();
> //renderContext.setImageDirectory("image");
> HashMap contextMap = new HashMap();
> contextMap.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,
> renderContext );
> task.setAppContext( contextMap );
>
> //Set rendering options - such as file or stream output, //output format,
> whether it is embeddable, etc
> HTMLRenderOption options = new HTMLRenderOption();
> options.setOutputFileName("c:/work/test/test.html");
> options.setOutputFormat("html");
> task.setRenderOption(options);
>
> //run the report and destroy the engine
> task.run();
>
> engine.destroy();
>
|
|
|
Powered by
FUDForum. Page generated in 0.03122 seconds