Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 40941

Summary: NPE when opening Extension Point Schema Editor
Product: [Eclipse Project] PDE Reporter: Jochen Wiedmann <joe>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Jochen Wiedmann CLA 2003-07-30 08:01:29 EDT
Upon opening the schema editor, I receive the following exception in the log
file. I am using Eclipse 3.0M2. If that matters, I may attach the schema
file on demand. However, I have several schema files in the project and the
problem seems to be the same for all files.


java.lang.NullPointerException

	at
org.eclipse.pde.internal.core.SourceDOMParser.startElement(SourceDOMParser.java:61)

	at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:313)

	at
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:610)

	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1608)

	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:346)

	at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:529)

	at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:585)

	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)

	at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:253)

	at org.eclipse.pde.internal.core.schema.Schema.load(Schema.java:339)

	at org.eclipse.pde.internal.core.schema.Schema.load(Schema.java:327)

	at
org.eclipse.pde.internal.core.schema.AbstractSchemaDescriptor.loadSchema(AbstractSchemaDescriptor.java:46)

	at
org.eclipse.pde.internal.core.schema.AbstractSchemaDescriptor.getSchema(AbstractSchemaDescriptor.java:39)

	at
org.eclipse.pde.internal.ui.editor.schema.SchemaEditor.createModel(SchemaEditor.java:49)

	at
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.initializeModels(PDEMultiPageEditor.java:495)

	at
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.init(PDEMultiPageEditor.java:472)

	at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:604)

	at org.eclipse.ui.internal.EditorManager.openInternalEditor(EditorManager.java:666)

	at
org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:459)

	at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:431)

	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2069)

	at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2019)

	at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2006)

	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84)

	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2001)

	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:1894)

	at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:237)

	at org.eclipse.ui.actions.OpenWithMenu.access$0(OpenWithMenu.java:231)

	at org.eclipse.ui.actions.OpenWithMenu$2.handleEvent(OpenWithMenu.java:155)

	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)

	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)

	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2188)

	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1878)

	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1680)

	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1663)

	at
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)

	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

	at java.lang.reflect.Method.invoke(Method.java:324)

	at org.eclipse.core.launcher.Main.basicRun(Main.java:291)

	at org.eclipse.core.launcher.Main.run(Main.java:747)

	at org.eclipse.core.launcher.Main.main(Main.java:583)
Comment 1 Wassim Melhem CLA 2003-07-30 10:20:39 EDT
You must have another parser on your machine that is masking the one shipped 
in Eclipse, and hence is incompatible with pde code.  What VM are you using?
Comment 2 Jochen Wiedmann CLA 2003-08-01 09:31:34 EDT
Confirmed. The problem seems to be related to the XML parser: In my
jre/lib/endorsed i have the Xerces parser which comes with JWSDP 1.2. If I
remove that directory, everything works fine. Tried both JWSDP 1.1 and 1.2.

Two things to consider: AFAIK the JWSDP parser will be bundled with future J2SE
versions. In other words, it is likely that others will observe the same
problem. Besides, the exception doesn't occur within the XML parser, but within
application code. Personally I think that the UI team should seriously consider
to take this as a bug.

Conclusion: I am leaving the bug open until a member of the UI team decides to
accept or close it.
Comment 3 Wassim Melhem CLA 2003-08-08 16:35:58 EDT
Another example of the xerces.jar being masked by another one in the JRE.

*** This bug has been marked as a duplicate of 39187 ***