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

Bug 335010

Summary: Creation of EJB client JAR does not add a project reference to it, from the EJB project, and hence the EJB project compilation fails
Product: [WebTools] WTP EJB Tools Reporter: Krum Bakalsky <bakalsky>
Component: jst.ejbAssignee: jst.ejb <jst.ejb-inbox>
Status: NEW --- QA Contact: Kaloyan Raev <kaloyan>
Severity: minor    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Krum Bakalsky CLA 2011-01-21 08:19:17 EST
Build Identifier: Build id: M20110105-0951

When you create and EJB Client JAR project, the business interfaces (and optional home interfaces) are moved into it, but no project reference is being put on the EJB project, to the newly created project. This leads to compilation failing for the EJB project.

Reproducible: Always

Steps to Reproduce:
1. Create an EJB project (no matter whether it is an 'old' one - EJB 2.x, or a 'new' one - EJB 3.x), choose to add to to an EAR project, but don't choose to create a client JAR in the wizard
2. So, we have the EJB and the EAR projects created. Create, for example, a session bean. In the EJB 3.x case, create either a local, or a remote business interface.
3. Trigger the client JAR creation action: right click on the EJB project -> 'Java EE Tools' -> 'Create EJB Client Jar'.
4. After the action completes, we have the client JAR project created, and the business interfaces are moved in it.

But now, the EJB project shows errors, because there is no project reference set from it, to the EJB Client JAR project, and thus, the session bean cannot compile.