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

Bug 319414

Summary: Project reference between report project and Java project not working with Java event handlers and Javascript
Product: z_Archived Reporter: James Stoddard <stoddardtec>
Component: BIRTAssignee: Birt-ReportDesigner <Birt-ReportDesigner-inbox>
Status: RESOLVED WORKSFORME QA Contact: Xiaoying Gu <bluesoldier>
Severity: major    
Priority: P3 CC: bluesoldier, lchan, stoddardtec
Version: 2.6.0   
Target Milestone: 4.4.0   
Hardware: Other   
OS: Linux   
Whiteboard:

Description James Stoddard CLA 2010-07-09 13:44:19 EDT
Build Identifier: I20100608-0911

In the report designer event handlers can be seen from the referenced Java project, but when the report is run in the report web viewer there is always a class not found exception.  I was able to get some functionality by manually adding needed classes to the classpath, but classes referenced by the Java project cannot be seen.

Reproducible: Always

Steps to Reproduce:
1. Create a report project
2. Create a Java project
3. Reference the Java project in the report project
4. Add an event handler from the Java project in the report project
5. Run the report in the designer web viewer
6. The referenced event handler will give a class not found
Comment 1 James Stoddard CLA 2010-07-09 13:47:55 EDT
The issue effects both Java event handlers and if a POJO is referenced in a Javascript event handler.
Comment 2 Xiaoying Gu CLA 2010-07-28 03:48:18 EDT
Did you reference the java project in report project from:

Properties -> Report Design -> Classpath -> Add Projects..?

I can preview the report which use a eventhandler after above setting.
Comment 3 James Stoddard CLA 2010-07-28 13:27:44 EDT
Yes, that works.  What through me was that Project References didn't work.  Even more, under Properties -> Report Design -> Classpath -> Add Class Folder and Properties -> Report Design -> Classpath -> Add External Class Folder both do not work either.  Properties -> Report Design -> Classpath -> Add External Jars works as well.  Thanks.
Comment 4 Xiaoying Gu CLA 2010-07-28 23:46:52 EDT
(In reply to comment #3)
> Yes, that works.  What through me was that Project References didn't work. 
> Even more, under Properties -> Report Design -> Classpath -> Add Class Folder
> and Properties -> Report Design -> Classpath -> Add External Class Folder both
> do not work either.  Properties -> Report Design -> Classpath -> Add External
> Jars works as well.  Thanks.

I think in Properties -> Report Design -> Classpath -> Add Class Folder/Add External Class Folder, you should choose the <java handler project>/bin folder instead of the <java handler project> folder.

It works in my environment.
Comment 5 Linda Chan CLA 2014-03-04 19:09:33 EST
See #comment3.
If the issue still exists for you, please feel free to reopen the bug with more details on how to reproduce.