Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 206054

Summary: Joint Data Set error when accessing Scripted Data Source utilizing a Java class
Product: z_Archived Reporter: Vinnie <vinniemagno>
Component: BIRTAssignee: Lin Zhu <lzhu>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: lzhu
Version: 2.2.0Keywords: plan
Target Milestone: 2.3.0 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard: Non-Auto

Description Vinnie CLA 2007-10-11 11:38:41 EDT
Build ID:  I20070625-1500

Steps To Reproduce:
1. Create a Scripted Data Source
2. Create a Data Set based on the Scripted Data Source. If you like, use the BIRT Scripted Data Source Flash Example and the SimpleClass.java.  Make sure you follow the example and place the SimpleClass.class in the BIRT viewer's classes folder.
3. Verify that the Data Set works properly and that you are able to preview the results and use it successfully in a table before continuing.
4. Now create a Joint Data Set.  For simplicity, try to join the Data Set to itself.  You can create a separate JDBC Data Set if you feel the first test is unrealistic.  The results will be the same.
5. From within the Joint Data Set dialog window, click the Output Columns menu item in the left pane.
6. You should receive the following error: A BIRT exception occurred: Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage SimpleClass] is not a function. 

More information:
I have successfully jointed two JDBC data sets.
I have tried other Java classes without success.
I have tried inserting an importPackage() statement in the Data Set's open script but it didn't help.
I tried jar'ing the class file and placing everywhere imaginable but it didn't correct the issue.
I used the Rhino script engine to confirm I could access the class successfully.
Comment 1 Lin Zhu CLA 2007-10-11 21:37:42 EDT
In design time we cannot access lib defined in BIRT viewer, this leads to the problem.
Comment 2 Lin Zhu CLA 2008-05-19 07:03:38 EDT
Resolved.