Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364090 - 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.2.5   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.2.5 P   Edit
Assignee: Galileo Perez CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 17:56 EST by Galileo Perez CLA
Modified: 2011-11-28 11:01 EST (History)
1 user (show)

See Also:
ccc: review+


Attachments
Solves the NPE situation for a not supported facet (6.98 KB, patch)
2011-11-17 17:59 EST, Galileo Perez CLA
no flags Details | Diff
Same patch (6.70 KB, patch)
2011-11-17 18:12 EST, Galileo Perez CLA
no flags Details | Diff
Solves the problem about EJB Wizard now showing up (8.20 KB, patch)
2011-11-22 17:21 EST, Galileo Perez CLA
ccc: iplog+
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 17:56:59 EST
Build Identifier: Eclipse 3.6.2

Build Identifier: Eclipse 3.6.2

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:
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:59:38 EST
Created attachment 207188 [details]
Solves the NPE situation for a not supported facet
Comment 2 Galileo Perez CLA 2011-11-17 18:12:49 EST
Created attachment 207189 [details]
Same patch

Added a cleaned patch
Comment 3 Carl Anderson CLA 2011-11-18 14:33:53 EST
I ran into issues if I try to create a project after I create an EAR with the runtime set to NONE.

java.lang.NullPointerException
at org.eclipse.wst.common.project.facet.core.internal.ProjectFacet.getLatestSupportedVersion(ProjectFacet.java:144)
at org.eclipse.jst.j2ee.project.facet.J2EEModuleFacetInstallDataModelProvider.hasValidRuntime(J2EEModuleFacetInstallDataModelProvider.java:215)
at org.eclipse.jst.j2ee.project.facet.J2EEModuleFacetInstallDataModelProvider.getDefaultProperty(J2EEModuleFacetInstallDataModelProvider.java:124)
at org.eclipse.jst.j2ee.internal.project.facet.UtilityFacetInstallDataModelProvider.getDefaultProperty(UtilityFacetInstallDataModelProvider.java:82)
Comment 4 Galileo Perez CLA 2011-11-22 17:21:51 EST
Created attachment 207391 [details]
Solves the problem about EJB Wizard now showing up
Comment 5 Carl Anderson CLA 2011-11-28 11:01:16 EST
The new patch looks good.  Committed to R3_2_5_patches