Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364086 - EJB Project wizard doesn't show up and shows an error
Summary: EJB Project wizard doesn't show up and shows an error
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.3.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.3.1 P   Edit
Assignee: Galileo Perez CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 16:26 EST by Galileo Perez CLA
Modified: 2011-12-01 15:56 EST (History)
2 users (show)

See Also:
cbridgha: review+


Attachments
Solves the problem about EJB Wizard not showing up because a NPE (6.98 KB, patch)
2011-11-17 17:01 EST, Galileo Perez CLA
no flags Details | Diff
resolves the NPe problem (6.70 KB, patch)
2011-11-17 18:14 EST, Galileo Perez CLA
no flags Details | Diff
Patch to fix the NPE when creating EJB project with no EAR existent (8.20 KB, patch)
2011-11-28 16:29 EST, Galileo Perez CLA
ccc: iplog+
Details | Diff
Prevents NPE when creating EJB Project (7.02 KB, patch)
2011-11-30 12:59 EST, Galileo Perez CLA
no flags Details | Diff
Galileo's patch, rebased on R3_3_1_patches (1.55 KB, patch)
2011-11-30 15:24 EST, Carl Anderson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Galileo Perez CLA 2011-11-17 16:26:42 EST
Build Identifier: Eclipse 3.7.1

Using an adopter product over eclipse 3.7.1 and WTP when creating an EJB project on a workspace with two runtimes, one supports a facet and the other doesn't. The wizard never appears and log. file shows a NPE.

java.lang.NullPointerException
	at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy.setProjectFacets(FacetedProjectWorkingCopy.java:726)
	at org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard.setRuntimeAndDefaultFacets(NewProjectDataModelFacetWizard.java:261)
	at org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard.createPageControls(NewProjectDataModelFacetWizard.java:150)
	at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:736)
	at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:608)
	at org.eclipse.jface.window.Window.create(Window.java:431)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)



Reproducible: Always

Steps to Reproduce:
1.Install the two runtimes with EJB facet that is not supported in one of them
2.Create a web project with runtime of the runtime that does not support the EJB facet and check the Add project to EAR checkbox
3.File > New > EJB Project
Comment 1 Galileo Perez CLA 2011-11-17 17:01:36 EST
Created attachment 207187 [details]
Solves the problem about EJB Wizard not showing up because a NPE

The patch verifies if a facet is valid in a runtime before to add the project as default EAR on the EJB creation wizard.
Comment 2 Galileo Perez CLA 2011-11-17 17:58:05 EST
https://bugs.eclipse.org/bugs/show_bug.cgi?id=364090 opened for eclipse 3.6.2 , wtp 3.2.5
Comment 3 Galileo Perez CLA 2011-11-17 18:14:48 EST
Created attachment 207190 [details]
resolves the NPe problem
Comment 4 Galileo Perez CLA 2011-11-28 16:29:09 EST
Created attachment 207627 [details]
Patch to fix the NPE when creating EJB project with no EAR existent

The difference from last one is a case not considered previously.
, and fixed on this patch
Comment 5 Chuck Bridgham CLA 2011-11-28 20:38:43 EST
approved
Comment 6 Galileo Perez CLA 2011-11-30 12:59:57 EST
Created attachment 207748 [details]
Prevents NPE when creating EJB Project

Patch to fix the NPE when creating EJB project with no EAR existent, problems no external code was modified as last patch does.
Comment 7 Carl Anderson CLA 2011-11-30 15:24:04 EST
Created attachment 207758 [details]
Galileo's patch, rebased on R3_3_1_patches
Comment 8 Carl Anderson CLA 2011-12-01 15:56:59 EST
Committed to R3_3_1_patches