WebReport Example with a Scripted Data Source

View: New views
3 Messages — Rating Filter:   Alert me  

WebReport Example with a Scripted Data Source

by ehlers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have successfully deployed the WebReport Example to my Tomcat instance. This work perfectly with html and PDF output.

Now I an trying to run that WebReport Example with a scripted DataSource from the Example from this tutorial:

http://download.eclipse.org/birt/downloads/examples/scripting/scripteddatasource/scripteddatasource.html

Even in Eclipse when going to the Preview tab i only get a "page not found error" with no logs. Of course i have placed the Class files in the corresponding classes folder or the birt viewer.

If I run the WebReport Example with the rptdesign xml file I get a strange error:

"WARNUNG: A BIRT exception occurred: Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage ContactistFactory] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (DataSet[Set].__bm_OPEN#3)
 Script source: DataSet[Set].__bm_OPEN, line: 1, text:
__bm_OPEN(). See next exception for more information.
Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage ContactistFactory] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (DataSet[Set].__bm_OPEN#3)
 Script source: DataSet[Set].__bm_OPEN, line: 1, text:
__bm_OPEN()
org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred: Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage ContactistFactory] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (DataSet[Set].__bm_OPEN#3)
 Script source: DataSet[Set].__bm_OPEN, line: 1, text:
__bm_OPEN(). See next exception for more information.
Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage ContactistFactory] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (DataSet[Set].__bm_OPEN#3)
 Script source: DataSet[Set].__bm_OPEN, line: 1, text:
__bm_OPEN()
        at org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:118)
..."

It seems that it cannot find the SimpleClass.class I have placed it in the classes folder of the WebReport Example.

Im really looking forward to your help

thanks

regards

kolja


Re: WebReport Example with a Scripted Data Source

by ehlers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I fixed the error. I found out that it had to do with the PPCONTEXT_CLASSLOADER_KEY

Re: WebReport Example with a Scripted Data Source

by usplim :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
Could you explain exactly how you fixed this..
Because i have been trying to fix the same issue for last 48 hrs..