Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-27781

NPE during deleting Dynamic web project with generated web.xml descriptor

    XMLWordPrintable

Details

    • Hide

      1. Create Wildfly 22 runtime and use Java 11 as its execution runtime
      2. Create Dynamic Web Project and associate it with wf22 runtime, Next
      3. Toggl to generate web.xml file
      4. Finish creating project
      5. Delete project and its all content (delete from disc option)
      6. Assert: Project is deleted and no error appeared
      Actually, project seems to be deleted but error are present. Moreover, in itests I got more and more errors while recreating project and adding JAX-RS/WS features. I am not really sure if that is just an outcome of former exceptions...

      Show
      1. Create Wildfly 22 runtime and use Java 11 as its execution runtime 2. Create Dynamic Web Project and associate it with wf22 runtime, Next 3. Toggl to generate web.xml file 4. Finish creating project 5. Delete project and its all content (delete from disc option) 6. Assert: Project is deleted and no error appeared Actually, project seems to be deleted but error are present. Moreover, in itests I got more and more errors while recreating project and adding JAX-RS/WS features. I am not really sure if that is just an outcome of former exceptions...

    Description

      I got similar NPE while running websocket itests, during creating and setting up project for testing purpose. It happens while I am editing java class file with JAX-WS/RS annotations.

      NPEs:

      !ENTRY org.eclipse.jst.jee 4 2 2021-04-07 13:04:43.514
      !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jst.jee".
      !STACK 0
      java.lang.NullPointerException
      	at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.createModelResource(JEE5ModelProvider.java:209)
      	at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.getModelResource(JEE5ModelProvider.java:190)
      	at org.eclipse.jst.jee.model.internal.Web25ModelProvider.getModelObject(Web25ModelProvider.java:44)
      	at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.getModelObject(JEE5ModelProvider.java:233)
      	at org.eclipse.jst.jee.model.internal.Web25MergedModelProvider.getXmlWebApp(Web25MergedModelProvider.java:59)
      	at org.eclipse.jst.jee.model.internal.Web25MergedModelProvider.internalModelChanged(Web25MergedModelProvider.java:155)
      	at org.eclipse.jst.jee.model.internal.Web25MergedModelProvider.xmlModelChanged(Web25MergedModelProvider.java:146)
      	at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider$XmlModelListener.modelsChanged(AbstractMergedModelProvider.java:91)
      	at org.eclipse.jst.jee.model.internal.JEE5ModelProvider$NotifyRunner.run(JEE5ModelProvider.java:470)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
      	at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.notifyListeners(JEE5ModelProvider.java:445)
      	at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.resourceChanged(JEE5ModelProvider.java:117)
      	at org.eclipse.jst.jee.model.internal.JEE5ModelProvider$ResourceAdapter.notifyChanged(JEE5ModelProvider.java:81)
      	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
      	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.setModified(ResourceImpl.java:1867)
      	at org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsEList.modified(ResourceImpl.java:486)
      	at org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsEList.didRemove(ResourceImpl.java:447)
      	at org.eclipse.emf.common.util.AbstractEList.didClear(AbstractEList.java:170)
      	at org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsEList.didClear(ResourceImpl.java:466)
      	at org.eclipse.emf.common.util.BasicEList.clear(BasicEList.java:639)
      	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doClear(NotifyingListImpl.java:1158)
      	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.clear(NotifyingListImpl.java:1085)
      	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.doUnload(ResourceImpl.java:1699)
      	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doUnload(XMLResourceImpl.java:720)
      	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.unload(ResourceImpl.java:1721)
      	at org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.removeAndUnloadAllResources(ProjectResourceSetImpl.java:885)
      	at org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.release(ProjectResourceSetImpl.java:866)
      	at org.eclipse.wst.common.internal.emfworkbench.integration.ResourceSetWorkbenchEditSynchronizer.release(ResourceSetWorkbenchEditSynchronizer.java:222)
      	at org.eclipse.jem.util.emf.workbench.ResourceSetWorkbenchSynchronizer.resourceChanged(ResourceSetWorkbenchSynchronizer.java:184)
      	at org.eclipse.wst.common.internal.emfworkbench.integration.ResourceSetWorkbenchEditSynchronizer.resourceChanged(ResourceSetWorkbenchEditSynchronizer.java:137)
      	at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:305)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
      	at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:295)
      	at org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:271)
      	at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:375)
      	at org.eclipse.core.internal.resources.Resource.broadcastPreDeleteEvent(Resource.java:1851)
      	at org.eclipse.core.internal.resources.Resource.delete(Resource.java:747)
      	at org.eclipse.core.internal.resources.Project.delete(Project.java:320)
      	at org.eclipse.ltk.core.refactoring.resource.DeleteResourceChange.perform(DeleteResourceChange.java:155)
      	at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:281)
      	at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:281)
      	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.lambda$0(PerformChangeOperation.java:258)
      	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
      	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
      	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:295)
      	at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:94)
      	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:219)
      	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
      	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
      	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:89)
      	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
      

      Which is followed later with this one:

      !ENTRY org.eclipse.core.jobs 4 2 2021-04-07 12:57:31.670
      !MESSAGE An internal error occurred during: "J2EE Component Mapping Update".
      !STACK 0
      java.lang.NullPointerException
      	at org.eclipse.jst.j2ee.refactor.listeners.J2EEElementChangedListener.getDestinationFolder(J2EEElementChangedListener.java:348)
      	at org.eclipse.jst.j2ee.refactor.listeners.J2EEElementChangedListener.getJavaSrcMappings(J2EEElementChangedListener.java:181)
      	at org.eclipse.jst.j2ee.refactor.listeners.J2EEElementChangedListener.access$0(J2EEElementChangedListener.java:174)
      	at org.eclipse.jst.j2ee.refactor.listeners.J2EEElementChangedListener$1.runInWorkspace(J2EEElementChangedListener.java:111)
      	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
      

      Attachments

        Issue Links

          Activity

            People

              stephane.bouchet Stephane Bouchet
              odockal@redhat.com Ondrej Dockal
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: