[jbosstools-dev] NullPointer exception in all ResourceChangeListeners
Denis Golovin
dgolovin at exadel.com
Wed Oct 31 20:16:55 EDT 2007
I have weird null pointer exceptions when I remove projects. I always
have several NPE, see logs below.
event.getDelta() can return null for several cases, so I've added
if(event.getDelta()!=null) every place where I saw NPE.
And here is an issue http://jira.jboss.org/jira/browse/JBIDE-1238
!ENTRY org.eclipse.core.resources 4 2 2007-10-31 12:30:29.234
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
at
org.jboss.ide.eclipse.archives.core.WorkspaceChangeListener.resourceChanged(WorkspaceChangeListener.java:55)
at
org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:282)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:276)
at
org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:260)
at
org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:305)
at
org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1662)
at
org.eclipse.core.internal.resources.Resource.delete(Resource.java:700)
at org.eclipse.core.internal.resources.Project.delete(Project.java:289)
at
org.eclipse.ui.ide.undo.WorkspaceUndoUtil.delete(WorkspaceUndoUtil.java:578)
at
org.eclipse.ui.ide.undo.WorkspaceUndoUtil.delete(WorkspaceUndoUtil.java:172)
at
org.eclipse.ui.ide.undo.AbstractResourcesOperation.delete(AbstractResourcesOperation.java:111)
at
org.eclipse.ui.ide.undo.DeleteResourcesOperation.doExecute(DeleteResourcesOperation.java:67)
at
org.eclipse.ui.ide.undo.AbstractWorkspaceOperation$1.run(AbstractWorkspaceOperation.java:206)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at
org.eclipse.ui.ide.undo.AbstractWorkspaceOperation.execute(AbstractWorkspaceOperation.java:204)
at
org.eclipse.ui.actions.DeleteResourceAction$4.run(DeleteResourceAction.java:533)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!ENTRY org.eclipse.core.resources 4 2 2007-10-31 12:30:29.250
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
at
org.jboss.ide.eclipse.as.core.modules.SingleDeployableFactory$FileDeletionListener.resourceChanged(SingleDeployableFactory.java:257)
at
org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:282)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:276)
at
org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:260)
at
org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:305)
at
org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1662)
at
org.eclipse.core.internal.resources.Resource.delete(Resource.java:700)
at org.eclipse.core.internal.resources.Project.delete(Project.java:289)
at
org.eclipse.ui.ide.undo.WorkspaceUndoUtil.delete(WorkspaceUndoUtil.java:578)
at
org.eclipse.ui.ide.undo.WorkspaceUndoUtil.delete(WorkspaceUndoUtil.java:172)
at
org.eclipse.ui.ide.undo.AbstractResourcesOperation.delete(AbstractResourcesOperation.java:111)
at
org.eclipse.ui.ide.undo.DeleteResourcesOperation.doExecute(DeleteResourcesOperation.java:67)
at
org.eclipse.ui.ide.undo.AbstractWorkspaceOperation$1.run(AbstractWorkspaceOperation.java:206)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at
org.eclipse.ui.ide.undo.AbstractWorkspaceOperation.execute(AbstractWorkspaceOperation.java:204)
at
org.eclipse.ui.actions.DeleteResourceAction$4.run(DeleteResourceAction.java:533)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!ENTRY org.eclipse.core.resources 4 2 2007-10-31 12:30:29.375
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
at
org.jboss.ide.eclipse.archives.core.WorkspaceChangeListener.resourceChanged(WorkspaceChangeListener.java:55)
at
org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:282)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:276)
at
org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:260)
at
org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:305)
at
org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1662)
at
org.eclipse.core.internal.resources.Resource.delete(Resource.java:700)
at org.eclipse.core.internal.resources.Project.delete(Project.java:289)
at
org.eclipse.ui.ide.undo.WorkspaceUndoUtil.delete(WorkspaceUndoUtil.java:578)
at
org.eclipse.ui.ide.undo.WorkspaceUndoUtil.delete(WorkspaceUndoUtil.java:172)
at
org.eclipse.ui.ide.undo.AbstractResourcesOperation.delete(AbstractResourcesOperation.java:111)
at
org.eclipse.ui.ide.undo.DeleteResourcesOperation.doExecute(DeleteResourcesOperation.java:67)
at
org.eclipse.ui.ide.undo.AbstractWorkspaceOperation$1.run(AbstractWorkspaceOperation.java:206)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at
org.eclipse.ui.ide.undo.AbstractWorkspaceOperation.execute(AbstractWorkspaceOperation.java:204)
at
org.eclipse.ui.actions.DeleteResourceAction$4.run(DeleteResourceAction.java:533)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!ENTRY org.eclipse.core.resources 4 2 2007-10-31 12:30:29.375
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
at
org.jboss.ide.eclipse.as.core.modules.SingleDeployableFactory$FileDeletionListener.resourceChanged(SingleDeployableFactory.java:257)
at
org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:282)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:276)
at
org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:260)
at
org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:305)
at
org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1662)
at
org.eclipse.core.internal.resources.Resource.delete(Resource.java:700)
at org.eclipse.core.internal.resources.Project.delete(Project.java:289)
at
org.eclipse.ui.ide.undo.WorkspaceUndoUtil.delete(WorkspaceUndoUtil.java:578)
at
org.eclipse.ui.ide.undo.WorkspaceUndoUtil.delete(WorkspaceUndoUtil.java:172)
at
org.eclipse.ui.ide.undo.AbstractResourcesOperation.delete(AbstractResourcesOperation.java:111)
at
org.eclipse.ui.ide.undo.DeleteResourcesOperation.doExecute(DeleteResourcesOperation.java:67)
at
org.eclipse.ui.ide.undo.AbstractWorkspaceOperation$1.run(AbstractWorkspaceOperation.java:206)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at
org.eclipse.ui.ide.undo.AbstractWorkspaceOperation.execute(AbstractWorkspaceOperation.java:204)
at
org.eclipse.ui.actions.DeleteResourceAction$4.run(DeleteResourceAction.java:533)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Denis
More information about the jbosstools-dev
mailing list