execute report via engine api ,but I get a java.lang.NoSuchMethodError,why? :( [message #159369] |
Tue, 09 May 2006 04:33  |
Eclipse User |
|
|
|
Originally posted by: qq_qiutao.yahoo.com.cn
I executed a report via birt engine api and I get a strange
execption(java.lang.NoSuchMethodError).but the same report can
be executed in the Web View Example of birt-runtime-2_0_1 in
tomcat 5.0.28.
please help me! thanks
the error information:
org.eclipse.birt.report.engine.api.EngineException: Error happened while
running the report at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:200)
at test.birt.BirtTest.process(BirtTest.java:152)
at test.birt.BirtTest.main(BirtTest.java:264)
Caused by: java.lang.NoSuchMethodError:
org.mozilla.javascript.Parser.<init> (Lorg/mozilla/javascript/CompilerEnvirons;Lorg/mozilla/javas cript/ErrorReporter;)V
at
org.eclipse.birt.data.engine.impl.ExpressionCompiler.parse(E xpressionCompiler.java:123)
at
org.eclipse.birt.data.engine.impl.ExpressionCompiler.compile (ExpressionCompiler.java:90)
at
org.eclipse.birt.data.engine.impl.PreparedQuery.prepareExpre ssion(PreparedQuery.java:320)
at
org.eclipse.birt.data.engine.impl.PreparedQuery.prepareExpre ssions(PreparedQuery.java:300)
at
org.eclipse.birt.data.engine.impl.PreparedQuery.prepareGroup (PreparedQuery.java:268)
at
org.eclipse.birt.data.engine.impl.PreparedQuery.prepare(Prep aredQuery.java:184)
at
org.eclipse.birt.data.engine.impl.PreparedQuery.<init>(PreparedQuery.java:87)
at
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.<init >(PreparedDataSourceQuery.java:97)
at
org.eclipse.birt.data.engine.impl.PreparedExtendedDSQuery.<init >(PreparedExtendedDSQuery.java:65)
at
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ne wInstance(PreparedDataSourceQuery.java:74)
at
org.eclipse.birt.data.engine.impl.DataEngineImpl.prepare(Dat aEngineImpl.java:409)
at
org.eclipse.birt.report.engine.data.dte.DteDataEngine.prepar e(DteDataEngine.java:171)
at
org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:107)
at
org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:89)
at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:175)
... 2 more
------------------------------------------------------------ ------------------
my code:
public void process(Map paramsMap, String rptName) throws EngineException {
assert paramsMap != null && rptName != null;
IReportRunnable design = openReportDesign(BASE_PATH
+ rptName);
System.out.println(design.getReportName());
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
HTMLRenderContext renderContext = new HTMLRenderContext();
//renderContext.setImageDirectory("image");
HashMap contextMap = new HashMap();
contextMap.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEX T,
renderContext);
task.setAppContext(contextMap);
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFileName("d:/temp.html");
//options.setOutputFormat(RenderOptionBase.OUTPUT_FORMAT_HTM L);
System.out.println(RenderOptionBase.OUTPUT_FORMAT_HTML);
task.setRenderOption(options);
task.setParameterValues(parseParameter(paramsMap, rptName,
Locale.CHINESE,design));
try {
task.run();
} catch (BirtException eBirt) {
eBirt.printStackTrace();
} finally {
task.close();
}
}
|
|
|
|
Re: execute report via engine api ,but I get a java.lang.NoSuchMethodError,why? :( [message #159614 is a reply to message #159417] |
Tue, 09 May 2006 09:21   |
Eclipse User |
|
|
|
Originally posted by: qq.qiutao.gmail.com
yes,I do have the js.jar in my classpath.
I change the report to the test.rptdesign of the Web Viewer Example,then my
program is in work.
why? :(
"Jason Weathersby" <jweathersby@actuate.com> wrote in message
news:e3pnb4$651$1@utils.eclipse.org...
> Do you have all the jars in the Report Engine directory in your classpath?
> Specifically js.jar?
>
> Jason
>
> "Michael" <qq_qiutao@yahoo.com.cn> wrote in message
> news:f05a988f9a7e13243913c5d6b7d4395b$1@www.eclipse.org...
>> I executed a report via birt engine api and I get a strange
>> execption(java.lang.NoSuchMethodError).but the same report can
>> be executed in the Web View Example of birt-runtime-2_0_1 in tomcat
>> 5.0.28.
>>
>> please help me! thanks
>>
>> the error information:
>>
>> org.eclipse.birt.report.engine.api.EngineException: Error happened while
>> running the report at
>> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:200)
>> at test.birt.BirtTest.process(BirtTest.java:152)
>> at test.birt.BirtTest.main(BirtTest.java:264)
>> Caused by: java.lang.NoSuchMethodError:
>> org.mozilla.javascript.Parser.<init> (Lorg/mozilla/javascript/CompilerEnvirons;Lorg/mozilla/javas cript/ErrorReporter;)V
>> at
>> org.eclipse.birt.data.engine.impl.ExpressionCompiler.parse(E xpressionCompiler.java:123)
>> at
>> org.eclipse.birt.data.engine.impl.ExpressionCompiler.compile (ExpressionCompiler.java:90)
>> at
>> org.eclipse.birt.data.engine.impl.PreparedQuery.prepareExpre ssion(PreparedQuery.java:320)
>> at
>> org.eclipse.birt.data.engine.impl.PreparedQuery.prepareExpre ssions(PreparedQuery.java:300)
>> at
>> org.eclipse.birt.data.engine.impl.PreparedQuery.prepareGroup (PreparedQuery.java:268)
>> at
>> org.eclipse.birt.data.engine.impl.PreparedQuery.prepare(Prep aredQuery.java:184)
>> at
>> org.eclipse.birt.data.engine.impl.PreparedQuery.<init>(PreparedQuery.java:87)
>> at
>> org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.<init >(PreparedDataSourceQuery.java:97)
>> at
>> org.eclipse.birt.data.engine.impl.PreparedExtendedDSQuery.<init >(PreparedExtendedDSQuery.java:65)
>> at
>> org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ne wInstance(PreparedDataSourceQuery.java:74)
>> at
>> org.eclipse.birt.data.engine.impl.DataEngineImpl.prepare(Dat aEngineImpl.java:409)
>> at
>> org.eclipse.birt.report.engine.data.dte.DteDataEngine.prepar e(DteDataEngine.java:171)
>> at
>> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:107)
>> at
>> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:89)
>> at
>> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:175)
>> ... 2 more
>>
>> ------------------------------------------------------------ ------------------
>> my code:
>> public void process(Map paramsMap, String rptName) throws EngineException
>> {
>> assert paramsMap != null && rptName != null;
>>
>> IReportRunnable design = openReportDesign(BASE_PATH
>> + rptName);
>> System.out.println(design.getReportName());
>> IRunAndRenderTask task = engine.createRunAndRenderTask(design);
>>
>> HTMLRenderContext renderContext = new HTMLRenderContext();
>> //renderContext.setImageDirectory("image");
>> HashMap contextMap = new HashMap();
>> contextMap.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEX T,
>> renderContext);
>> task.setAppContext(contextMap);
>>
>> HTMLRenderOption options = new HTMLRenderOption();
>>
>> options.setOutputFileName("d:/temp.html");
>> //options.setOutputFormat(RenderOptionBase.OUTPUT_FORMAT_HTM L);
>> System.out.println(RenderOptionBase.OUTPUT_FORMAT_HTML);
>> task.setRenderOption(options);
>>
>> task.setParameterValues(parseParameter(paramsMap, rptName,
>> Locale.CHINESE,design));
>> try {
>> task.run();
>> } catch (BirtException eBirt) {
>> eBirt.printStackTrace();
>> } finally {
>> task.close();
>> }
>> }
>>
>>
>
>
|
|
|
Re: execute report via engine api ,but I get a java.lang.NoSuchMethodError,why? :( [message #159690 is a reply to message #159614] |
Tue, 09 May 2006 16:44   |
Eclipse User |
|
|
|
Can you post your report?
Jason
"Michael" <qq.qiutao@gmail.com> wrote in message
news:e3q51h$qiv$1@utils.eclipse.org...
> yes,I do have the js.jar in my classpath.
> I change the report to the test.rptdesign of the Web Viewer Example,then
> my program is in work.
> why? :(
>
> "Jason Weathersby" <jweathersby@actuate.com> wrote in message
> news:e3pnb4$651$1@utils.eclipse.org...
>> Do you have all the jars in the Report Engine directory in your
>> classpath?
>> Specifically js.jar?
>>
>> Jason
>>
>> "Michael" <qq_qiutao@yahoo.com.cn> wrote in message
>> news:f05a988f9a7e13243913c5d6b7d4395b$1@www.eclipse.org...
>>> I executed a report via birt engine api and I get a strange
>>> execption(java.lang.NoSuchMethodError).but the same report can
>>> be executed in the Web View Example of birt-runtime-2_0_1 in tomcat
>>> 5.0.28.
>>>
>>> please help me! thanks
>>>
>>> the error information:
>>>
>>> org.eclipse.birt.report.engine.api.EngineException: Error happened while
>>> running the report at
>>> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:200)
>>> at test.birt.BirtTest.process(BirtTest.java:152)
>>> at test.birt.BirtTest.main(BirtTest.java:264)
>>> Caused by: java.lang.NoSuchMethodError:
>>> org.mozilla.javascript.Parser.<init> (Lorg/mozilla/javascript/CompilerEnvirons;Lorg/mozilla/javas cript/ErrorReporter;)V
>>> at
>>> org.eclipse.birt.data.engine.impl.ExpressionCompiler.parse(E xpressionCompiler.java:123)
>>> at
>>> org.eclipse.birt.data.engine.impl.ExpressionCompiler.compile (ExpressionCompiler.java:90)
>>> at
>>> org.eclipse.birt.data.engine.impl.PreparedQuery.prepareExpre ssion(PreparedQuery.java:320)
>>> at
>>> org.eclipse.birt.data.engine.impl.PreparedQuery.prepareExpre ssions(PreparedQuery.java:300)
>>> at
>>> org.eclipse.birt.data.engine.impl.PreparedQuery.prepareGroup (PreparedQuery.java:268)
>>> at
>>> org.eclipse.birt.data.engine.impl.PreparedQuery.prepare(Prep aredQuery.java:184)
>>> at
>>> org.eclipse.birt.data.engine.impl.PreparedQuery.<init>(PreparedQuery.java:87)
>>> at
>>> org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.<init >(PreparedDataSourceQuery.java:97)
>>> at
>>> org.eclipse.birt.data.engine.impl.PreparedExtendedDSQuery.<init >(PreparedExtendedDSQuery.java:65)
>>> at
>>> org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ne wInstance(PreparedDataSourceQuery.java:74)
>>> at
>>> org.eclipse.birt.data.engine.impl.DataEngineImpl.prepare(Dat aEngineImpl.java:409)
>>> at
>>> org.eclipse.birt.report.engine.data.dte.DteDataEngine.prepar e(DteDataEngine.java:171)
>>> at
>>> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:107)
>>> at
>>> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:89)
>>> at
>>> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:175)
>>> ... 2 more
>>>
>>> ------------------------------------------------------------ ------------------
>>> my code:
>>> public void process(Map paramsMap, String rptName) throws
>>> EngineException {
>>> assert paramsMap != null && rptName != null;
>>>
>>> IReportRunnable design = openReportDesign(BASE_PATH
>>> + rptName);
>>> System.out.println(design.getReportName());
>>> IRunAndRenderTask task = engine.createRunAndRenderTask(design);
>>>
>>> HTMLRenderContext renderContext = new HTMLRenderContext();
>>> //renderContext.setImageDirectory("image");
>>> HashMap contextMap = new HashMap();
>>> contextMap.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEX T,
>>> renderContext);
>>> task.setAppContext(contextMap);
>>>
>>> HTMLRenderOption options = new HTMLRenderOption();
>>>
>>> options.setOutputFileName("d:/temp.html");
>>> //options.setOutputFormat(RenderOptionBase.OUTPUT_FORMAT_HTM L);
>>> System.out.println(RenderOptionBase.OUTPUT_FORMAT_HTML);
>>> task.setRenderOption(options);
>>>
>>> task.setParameterValues(parseParameter(paramsMap, rptName,
>>> Locale.CHINESE,design));
>>> try {
>>> task.run();
>>> } catch (BirtException eBirt) {
>>> eBirt.printStackTrace();
>>> } finally {
>>> task.close();
>>> }
>>> }
>>>
>>>
>>
>>
>
>
|
|
|
Re: execute report via engine api ,but I get a java.lang.NoSuchMethodError,why? :( [message #159762 is a reply to message #159690] |
Wed, 10 May 2006 10:33  |
Eclipse User |
|
|
|
Originally posted by: qq.qiutao.gmail.com
Jason
thank you very much . today ,I created a new project and moved the java file
into this new project,then it did work. so I think the reason caused the
problem
is my older project environment(somthing is wrong about classpath,but I
can't find the error).
"Jason Weathersby" <jweathersby@actuate.com> wrote in message
news:e3quuk$6jp$1@utils.eclipse.org...
> Can you post your report?
>
> Jason
>
> "Michael" <qq.qiutao@gmail.com> wrote in message
> news:e3q51h$qiv$1@utils.eclipse.org...
>> yes,I do have the js.jar in my classpath.
>> I change the report to the test.rptdesign of the Web Viewer Example,then
>> my program is in work.
>> why? :(
>>
>> "Jason Weathersby" <jweathersby@actuate.com> wrote in message
>> news:e3pnb4$651$1@utils.eclipse.org...
>>> Do you have all the jars in the Report Engine directory in your
>>> classpath?
>>> Specifically js.jar?
>>>
>>> Jason
>>>
>>> "Michael" <qq_qiutao@yahoo.com.cn> wrote in message
>>> news:f05a988f9a7e13243913c5d6b7d4395b$1@www.eclipse.org...
>>>> I executed a report via birt engine api and I get a strange
>>>> execption(java.lang.NoSuchMethodError).but the same report can
>>>> be executed in the Web View Example of birt-runtime-2_0_1 in tomcat
>>>> 5.0.28.
>>>>
>>>> please help me! thanks
>>>>
>>>> the error information:
>>>>
>>>> org.eclipse.birt.report.engine.api.EngineException: Error happened
>>>> while running the report at
>>>> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:200)
>>>> at test.birt.BirtTest.process(BirtTest.java:152)
>>>> at test.birt.BirtTest.main(BirtTest.java:264)
>>>> Caused by: java.lang.NoSuchMethodError:
>>>> org.mozilla.javascript.Parser.<init> (Lorg/mozilla/javascript/CompilerEnvirons;Lorg/mozilla/javas cript/ErrorReporter;)V
>>>> at
>>>> org.eclipse.birt.data.engine.impl.ExpressionCompiler.parse(E xpressionCompiler.java:123)
>>>> at
>>>> org.eclipse.birt.data.engine.impl.ExpressionCompiler.compile (ExpressionCompiler.java:90)
>>>> at
>>>> org.eclipse.birt.data.engine.impl.PreparedQuery.prepareExpre ssion(PreparedQuery.java:320)
>>>> at
>>>> org.eclipse.birt.data.engine.impl.PreparedQuery.prepareExpre ssions(PreparedQuery.java:300)
>>>> at
>>>> org.eclipse.birt.data.engine.impl.PreparedQuery.prepareGroup (PreparedQuery.java:268)
>>>> at
>>>> org.eclipse.birt.data.engine.impl.PreparedQuery.prepare(Prep aredQuery.java:184)
>>>> at
>>>> org.eclipse.birt.data.engine.impl.PreparedQuery.<init>(PreparedQuery.java:87)
>>>> at
>>>> org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.<init >(PreparedDataSourceQuery.java:97)
>>>> at
>>>> org.eclipse.birt.data.engine.impl.PreparedExtendedDSQuery.<init >(PreparedExtendedDSQuery.java:65)
>>>> at
>>>> org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ne wInstance(PreparedDataSourceQuery.java:74)
>>>> at
>>>> org.eclipse.birt.data.engine.impl.DataEngineImpl.prepare(Dat aEngineImpl.java:409)
>>>> at
>>>> org.eclipse.birt.report.engine.data.dte.DteDataEngine.prepar e(DteDataEngine.java:171)
>>>> at
>>>> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:107)
>>>> at
>>>> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:89)
>>>> at
>>>> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:175)
>>>> ... 2 more
>>>>
>>>> ------------------------------------------------------------ ------------------
>>>> my code:
>>>> public void process(Map paramsMap, String rptName) throws
>>>> EngineException {
>>>> assert paramsMap != null && rptName != null;
>>>>
>>>> IReportRunnable design = openReportDesign(BASE_PATH
>>>> + rptName);
>>>> System.out.println(design.getReportName());
>>>> IRunAndRenderTask task = engine.createRunAndRenderTask(design);
>>>>
>>>> HTMLRenderContext renderContext = new HTMLRenderContext();
>>>> //renderContext.setImageDirectory("image");
>>>> HashMap contextMap = new HashMap();
>>>> contextMap.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEX T,
>>>> renderContext);
>>>> task.setAppContext(contextMap);
>>>>
>>>> HTMLRenderOption options = new HTMLRenderOption();
>>>>
>>>> options.setOutputFileName("d:/temp.html");
>>>> //options.setOutputFormat(RenderOptionBase.OUTPUT_FORMAT_HTM L);
>>>> System.out.println(RenderOptionBase.OUTPUT_FORMAT_HTML);
>>>> task.setRenderOption(options);
>>>>
>>>> task.setParameterValues(parseParameter(paramsMap, rptName,
>>>> Locale.CHINESE,design));
>>>> try {
>>>> task.run();
>>>> } catch (BirtException eBirt) {
>>>> eBirt.printStackTrace();
>>>> } finally {
>>>> task.close();
>>>> }
>>>> }
>>>>
>>>>
>>>
>>>
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.11726 seconds