| Summary: | EjbClientProjectCreationOperation fails creating EJB client if the project does not have target runtime | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP EJB Tools | Reporter: | Roberto Sanchez Herrera <shr31223> | ||||
| Component: | jst.ejb | Assignee: | Roberto Sanchez Herrera <shr31223> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Kaloyan Raev <kaloyan> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | Flags: | kaloyan:
review+
|
||||
| Version: | 3.3.1 | ||||||
| Target Milestone: | 3.3.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 209043 [details]
Patch for 3.3.2 and 3.4
Code committed to R3_3_maintenance and HEAD for WTP 3.3.2 and 3.4. Resolving defect. |
In EjbClientProjectCreationOperation, the operation will fail if the project does not have target runtime. The code fails here: //Ensure Java DM has latest supported version try { IProjectFacetVersion oldVersion = (IProjectFacetVersion) javadm.getProperty(IFacetDataModelProperties.FACET_VERSION); IProjectFacetVersion newVersion = JavaFacet.FACET.getLatestSupportedVersion(runtime); <<<<<------ An exception is thrown here if runtime is null if (newVersion != null && (oldVersion == null || oldVersion.getVersionString().compareTo(newVersion.getVersionString()) < 0 || !runtime.supports(oldVersion))) { javadm.setProperty(IFacetDataModelProperties.FACET_VERSION, newVersion); } } catch (CoreException e) { ModulecorePlugin.logError(e); }