| Summary: | receiving "is not a function, it is object" when creating a Joined Data Set with a Scripted Data Source | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Dusty Little <dlittle> | ||||||||||||||
| Component: | BIRT | Assignee: | Birt-DataAccess <Birt-DataAccess-inbox> | ||||||||||||||
| Status: | CLOSED FIXED | QA Contact: | Hao Zhou <hao.zhou> | ||||||||||||||
| Severity: | normal | ||||||||||||||||
| Priority: | P3 | CC: | bluesoldier | ||||||||||||||
| Version: | unspecified | ||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||
| Hardware: | PC | ||||||||||||||||
| OS: | Linux | ||||||||||||||||
| Whiteboard: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Dusty Little
Here is the full text of the error:
A BIRT exception occurred.
Plug-in Provider:Eclipse BIRT Project
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:3.7.1.v20110905
Error Code:data.engine.FailToExecuteScript
Error Message:Fail to execute script in function __bm_open(). Source:
------
" + importPackage(Packages.com.groupbasis.json);
// This will track the current row later on
count = 0;
// Create instance of the Controller class
parser = new Packages.com.groupbasis.json.MKLiveStatusParser();
// Load the JSON Source
parser.loadData("http://192.168.122.65/gbutils/live.php?q=GET%20hosts%0AColumns:%20name%20state%0A");
// Calculate the total rows we will have
totalCount = parser.getTotalCount(); + "
-----
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage com.groupbasis.json.MKLiveStatusParser] is not a function, it is object. (<inline>#7)
Script source: <inline>, line: 0, text:
__bm_open()
I can't reproduce this issue with latest birt. If you can still reproduce it,could you provide more detail information about how to reproduce it or a sample report I can test with. Created attachment 206292 [details]
report containing the json joint dataset testcase
Created attachment 206294 [details]
birt json error 1
Error received when clicking finish in the Joint Dataset wizard.
Created attachment 206295 [details]
birt json error 2
Screenshot showing that the scripted datasets are functioning and that data is fetched correctly.
Created attachment 206296 [details]
birt json error 3
Screenshot showing that the error is generated again upon clicking "OK" to close the edit dataset dialog.
Created attachment 206297 [details]
birt json error 4
Screenshot showing that the joint dataset is generated but now fields are available for inclusion in the report.
Created attachment 206298 [details]
json.jar
Jar file containing the json dependencies the scripted datasources. The source is probably al little dated and could be updated from the git repository, but the all test cases indicate that the code works for this data set.
I've attached an example report that demonstrates the error along with the json.jar dependency and screenshots that show the behaviour I am experiencing. I can run your report without errors. Please try again and follow these steps: 1,open your report 2,click layout 3,property editor->properties->Resource tab 4,add your jar file 5,No error occur when choose OK to save the data set Thanks Xiaoying, That solved my error. |