Community
Participate
Working Groups
The following NPE can be observed in 321 code because of a stale portion of the the dependencygraph. This can reproduced when removing modules from an EAR that contains a deployment descriptor. !ENTRY org.eclipse.jst.j2ee 4 2 2010-06-23 12:26:20.156 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jst.j2ee". !STACK 0 java.lang.NullPointerException at org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathContainer.getBaseEARLibRefs(J2EEComponentClasspathContainer.java:364) at org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathContainer.requiresUpdate(J2EEComponentClasspathContainer.java:131) at org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathContainer.refresh(J2EEComponentClasspathContainer.java:427) at org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater$ModuleUpdateJob.processModules(J2EEComponentClasspathUpdater.java:302) at org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater$ModuleUpdateJob.access$4(J2EEComponentClasspathUpdater.java:286) at org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater$ModuleUpdateJob$1.run(J2EEComponentClasspathUpdater.java:327) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater$ModuleUpdateJob.run(J2EEComponentClasspathUpdater.java:312) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Created attachment 172531 [details] patch for 3.2.1 The specific problem, is that during any event that triggers a project add (this can be triggered by things other than actually a project coming into the workspace, e.g. a change to the .project file). When an ADD event comes through, the entire graph needs to be updated; this implies that everything needs to be removed and then added again; the bug is the remove was not happening. How this escaped notice for so long, I can't understand, but the fix is simple, and I also updated the event that is passed around so it properly resolves a remove and add of the same dependency as no change.
approved
code checked into head for wtp 3.2.1