Community
Participate
Working Groups
Build Identifier: java.lang.NullPointerException: No IModelProvider exists for project P/staticC of version: Static Web Module at org.eclipse.jst.j2ee.model.ModelProviderManager.getModelProvider(ModelProviderManager.java:101) at org.eclipse.jst.j2ee.model.ModelProviderManager.getModelProvider(ModelProviderManager.java:281) at org.eclipse.jst.j2ee.refactor.operations.ProjectRenameOperation.updateProject(ProjectRenameOperation.java:114) at org.eclipse.jst.j2ee.refactor.operations.ProjectRefactorOperation.execute(ProjectRefactorOperation.java:56) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl$1.run(DataModelPausibleOperationImpl.java:385) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:410) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:360) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.doExecute(DataModelPausibleOperationImpl.java:247) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.executeImpl(DataModelPausibleOperationImpl.java:219) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.cacheThreadAndContinue(DataModelPausibleOperationImpl.java:89) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.execute(DataModelPausibleOperationImpl.java:207) at org.eclipse.jst.j2ee.refactor.listeners.ProjectRefactoringListener$1.runInWorkspace(ProjectRefactoringListener.java:226) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Reproducible: Always Steps to Reproduce: Steps to reproduce: 1) Create a static web project called ProjectA 2) Right click ProjectA and select rename. Change the name to FooA
Created attachment 204700 [details] Patch
The thing is that ProjectRenameOperation.updateProject()is considering that the Static Web project has a Model Provider when it does not. The patch add an extra validation.
Can you make this a little more robust? How did the ProjectRenameOperation get registered for this project type in the first place? - I hate to keep adding project types to the exclusion list.. maybe this can be done better?
approved, and after conversation - agreed making a more robust change in current release - bugzilla to be opened
https://bugs.eclipse.org/bugs/show_bug.cgi?id=360698 has been created to handle a more robust solution.
*Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. - A NPE is thrown when a Static Web Project is renamed *Is there a work-around? If so, why do you believe the work-around is insufficient? - There is not a workaround, the exception is logged always. *How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? - Manually *Give a brief technical overview. Who has reviewed this fix? - ProjectRenameOperation.updateProject() considers that the Static Web project has a Model Provider when it does not. The patch adds an extra validation. *What is the risk associated with this fix? -None
This was committed to R3_2_maintenance for WTP 3.2.5 on 10/12. Leaving it open to get this fix into next week's WTP 3.3.2 driver.
Committed to R3_3_maintenance for WTP 3.3.2