Skip to content

Bugs in Rewrite Entry of type System ID to XML Catalog #19

@heidivanparys

Description

@heidivanparys

When I try to add a Rewrite Entry with "Key type to match" set to "System ID" to my XML Catalog, I get a NullPointerException.

Steps performed

Image

(example from https://xmlcatalogs.org/catalogs-1.1#s.rewrite)

When clicking OK, the dialog does not close, and the error "Unhandled event loop exception" appears in the Error Log (see the whole log entry below).

Workaround

Add a Rewrite Entry with the "Key type to match" set to "URI".

Image

Image

Open the entry again, change "Key type to match" from "URI" to "System ID", and click OK.

The entry is displayed correct in when selecting it in the XML Catalog, and is also exported correct.

Image

Note that there is another (related?) bug: when editing the entry again, the "Key type to match" dropdown will again show URI, although the entry was saved with "Key type to match" = "System ID".

Image

Image

eclipse.buildId=4.36.0.20250605-1300
java.version=21.0.7
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.dsl.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.dsl.product

org.eclipse.ui
Error
Mon Jun 23 13:43:20 CEST 2025
Unhandled event loop exception

java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "org.eclipse.wst.xml.core.internal.catalog.provisional.IRewriteEntry.getStartString()" is null
	at org.eclipse.wst.xml.ui.internal.catalog.EditCatalogEntryDialog$RewriteEntryPage.validateData(EditCatalogEntryDialog.java:1317)
	at org.eclipse.wst.xml.ui.internal.catalog.EditCatalogEntryDialog$RewriteEntryPage.saveData(EditCatalogEntryDialog.java:1290)
	at org.eclipse.wst.xml.ui.internal.catalog.EditCatalogEntryDialog.buttonPressed(EditCatalogEntryDialog.java:1491)
	at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:615)
	at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:83)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:286)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4338)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1214)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4136)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3724)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
	at org.eclipse.jface.window.Window.open(Window.java:799)
	at org.eclipse.wst.xml.ui.internal.catalog.XMLCatalogEntriesView.invokeDialog(XMLCatalogEntriesView.java:212)
	at org.eclipse.wst.xml.ui.internal.catalog.XMLCatalogEntriesView.invokeDialog(XMLCatalogEntriesView.java:217)
	at org.eclipse.wst.xml.ui.internal.catalog.XMLCatalogEntriesView.performNew(XMLCatalogEntriesView.java:225)
	at org.eclipse.wst.xml.ui.internal.catalog.XMLCatalogEntriesView$2.widgetSelected(XMLCatalogEntriesView.java:125)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:286)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4338)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1214)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4136)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3724)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
	at org.eclipse.jface.window.Window.open(Window.java:799)
	at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:64)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:581)
	at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:415)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4338)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1214)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4136)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3724)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:678)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:583)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:185)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:627)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1431)


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions