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

Bug 367331

Summary: NPE in JavaEERefactoringParticipant when deleting EJB project with EJB jar client and without EAR
Product: [WebTools] WTP Java EE Tools Reporter: Roberto Sanchez Herrera <shr31223>
Component: jst.j2eeAssignee: Roberto Sanchez Herrera <shr31223>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc, makandre
Version: 3.3.1Flags: cbridgha: review+
Target Milestone: 3.3.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 367872    
Attachments:
Description Flags
Proposed patch none

Description Roberto Sanchez Herrera CLA 2011-12-21 10:10:07 EST
The bug 365653 allows the possibility to have an EJB project with EJB client outside an EAR. If you have this scenario, and you try to delete the EJB project, you will see the following NPE:

java.lang.NullPointerException
	at org.eclipse.jst.javaee.ltk.core.participant.JavaEERefactoringParticipant.createChange(JavaEERefactoringParticipant.java:61)
	at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.createChange(ProcessorBasedRefactoring.java:308)
	at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:124)
	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:209)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Comment 1 Roberto Sanchez Herrera CLA 2011-12-21 13:02:50 EST
Created attachment 208700 [details]
Proposed patch

Proposed patch that can be applied to R3_3_maintenance and HEAD for WTP 3.3.2 and 3.4
Comment 2 Chuck Bridgham CLA 2012-01-04 10:34:06 EST
approved
Comment 3 Roberto Sanchez Herrera CLA 2012-01-04 11:25:52 EST
Code committed to R3_3_maintenance and HEAD for WTP 3.3.2 and 3.4. Resolving bug