Community
Participate
Working Groups
Import external plug-ins from file system will fail in one form or other (depending on the build)until the user opens a PDE perspective. In M5 it fails with an NPE. Installed an M5 driver, while in the resource perspective, my very first action was to imort external plug-ins from file system. This produced an NPE <?xml version="1.0" encoding="UTF-8"?> <log> <log-entry date="Mon May 06 07:58:18 EDT 2002"> <status plugin-id="org.eclipse.pde.ui" severity="ERROR" message="java.lang.NullPointerException" code="0"> <exception message="null" trace=" java.lang.NullPointerException at org.eclipse.jdt.internal.core.JavaModelManager.runOperation (JavaModelManager.java:1150) at org.eclipse.jdt.internal.core.JavaElement.runOperation (JavaElement.java:550) at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath (JavaProject.java:1911) at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath (JavaProject.java:1882) at org.eclipse.pde.internal.ui.wizards.imports.UpdateClasspathOperation.run (UpdateClasspathOperation.java:97) at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.createProject (PluginImportOperation.java:216) at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.run (PluginImportOperation.java:101) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.pde.internal.ui.wizards.imports.PluginImportWizard$2.run (PluginImportWizard.java:122) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98) "> </exception> </status> </log-entry> </log>
Created attachment 758 [details] PDE Project exports used to produce the NPE on M5
If you carefully check the exception stack, you will see that the exception is in JavaModelManager, not in PDE. Moving to JDT Core.
It is clear that the exception is coming from the JDT, however it is not clear whether the PDE import puts the project in a valid state before turning the JavaModelManger loose. Our observation is that once the user has opened a PDE perspective then JDT seems to handel the pde projects on import without exception.
This issue got fixed along when addressing bug 17562 (build 20020527). The JavaModel unique handle is created eagerly and cache onto the JavaModelManager. These symptoms could have occurred if the JavaModelManager offending code was running before the JavaModel had been opened elsewhere. Closing
Verified