Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 202092 - BIRT Report Designer Erros when previewing dataset from scripted datasource
Summary: BIRT Report Designer Erros when previewing dataset from scripted datasource
Status: RESOLVED DUPLICATE of bug 190500
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: Future   Edit
Assignee: Lin Zhu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-03 12:09 EDT by Kim Baddeley CLA
Modified: 2007-09-04 04:32 EDT (History)
3 users (show)

See Also:


Attachments
Sample Report (4.71 KB, image/gif)
2007-09-03 12:09 EDT, Kim Baddeley CLA
no flags Details
Jar file to be placed in WEB-INF/lib that contains Java class for report (770 bytes, application/octet-stream)
2007-09-03 12:41 EDT, Kim Baddeley CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Baddeley CLA 2007-09-03 12:09:23 EDT
Created attachment 77592 [details]
Sample Report

Build ID: I20070625-1500

Steps To Reproduce:
1.Create a Dataset from a scripted datasource that is a Java class.

2.Right click the data set -> Edit -> Preview Results
 
3. The following error is displayed

A BIRT exception occurred.
  Plug-in Provider:Eclipse.org
  Plug-in Name:BIRT Data Engine
  Plug-in ID:org.eclipse.birt.data
  Version:2.2.0.v200706221
  Error Code:data.engine.BirtException
  Error Message:A BIRT exception occurred: Error evaluating Javascript expression. Script engine error: ReferenceError: "BIRTTest" is not defined. (DataSet[Mode List].__bm_open#6)
 Script source: DataSet[Mode List].__bm_open, line: 1, text:
__bm_open(). See next exception for more information.
Error evaluating Javascript expression. Script engine error: ReferenceError: "BIRTTest" is not defined. (DataSet[Mode List].__bm_open#6)
 Script source: DataSet[Mode List].__bm_open, line: 1, text:
__bm_open()



More information:
test class

========================================= 
import java.util.ArrayList;
import java.util.List;

public class BIRTTest
{
	public List getModeList()
	{
		
		List list = new ArrayList();
		
		list.add("Dev");
		list.add("Test");
		list.add("Live");
		
		return list;
	}
}
======================================

report xml attached
Comment 1 Kim Baddeley CLA 2007-09-03 12:41:42 EDT
Created attachment 77595 [details]
Jar file to be placed in WEB-INF/lib that contains Java class for report
Comment 2 Tim Buss CLA 2007-09-03 13:06:06 EDT
Misclassifid - reassigning
Comment 3 Lin Zhu CLA 2007-09-03 21:19:12 EDT
Hi Kim,

Could you please try to put the jar file under your application directory's "scriptlib" folder? It is under same level of Web-Inf folder.

Thanks.
Lin
Comment 4 Kim Baddeley CLA 2007-09-04 02:22:02 EDT
Hi Lin,

I already tried that and have done so again and can confirm that I still get the error.

Cheers,
Kim
Comment 5 Lin Zhu CLA 2007-09-04 04:32:02 EDT
Hi Kim,

Sorry I've not notice that the preview you are used is data set editor preview. Actually we already have bug address this issue. So I will mark the bug as duplicated with that bug.

Thanks.
Lin

*** This bug has been marked as a duplicate of bug 190500 ***