Bug 294671 - Exception creating EAR
Summary: Exception creating EAR
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 3.2 M4   Edit
Assignee: Neeraj Agrawal CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 316561
  Show dependency tree
 
Reported: 2009-11-09 16:41 EST by Neeraj Agrawal CLA
Modified: 2010-06-10 23:07 EDT (History)
1 user (show)

See Also:


Attachments
Patch (1.47 KB, text/plain)
2009-11-09 16:45 EST, Neeraj Agrawal CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Neeraj Agrawal CLA 2009-11-09 16:41:26 EST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4
Build Identifier: WTP 3.2 M3

1. Create a project named FooEAR  in your workspace

2. Now using following API launch the EAR wizard


public void testEARProjectWizard(){
    EarProjectWizard earWiz = new EarProjectWizard();
    	   earWiz.getDataModel().setStringProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, "FooEAR");
    	
	
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), earWiz);
  dialog.create();
  dialog.getShell().setSize(750, 600);
   dialog.open();
		
}


3. You will see exception in the error log
  "Cannot install project facet EAR 1.4. Some version of this project facet is already installed."

4. After that even if you change the project name, you cannot finish the wizard and further exceptions are thrown.



Reproducible: Always
Comment 1 Neeraj Agrawal CLA 2009-11-09 16:45:09 EST
Created attachment 151743 [details]
Patch

Fix is to not set the project name in underlying data structure unless it validates successfully.
Comment 2 Jason Sholl CLA 2009-11-09 16:48:24 EST
code checked into HEAD