mattcasters opened a new issue, #8662:
URL: https://github.com/apache/hop/issues/8662
### Apache Hop version?
2.20.0
### Java version?
OpenJDK 21
### Operating system
Linux
### What happened?
Needs to be hardened. When switching projects we should have an empty
Undo/Redo stack:
```
org.apache.hop.core.exception.HopException:
Error capturing WorkflowMeta snapshot
Cannot invoke "Object.getClass()" because "valueObject" is null
at
org.apache.hop.core.undo.XmlSnapshotUndo.captureSnapshot(XmlSnapshotUndo.java:118)
at
org.apache.hop.ui.hopgui.file.shared.HopGuiGraphSnapshotUndo.captureQuiet(HopGuiGraphSnapshotUndo.java:192)
at
org.apache.hop.ui.hopgui.file.shared.HopGuiGraphSnapshotUndo.initialize(HopGuiGraphSnapshotUndo.java:64)
at
org.apache.hop.ui.hopgui.file.workflow.HopGuiWorkflowGraph.<init>(HopGuiWorkflowGraph.java:487)
at
org.apache.hop.ui.hopgui.perspective.explorer.ExplorerPerspective.addWorkflow(ExplorerPerspective.java:2771)
at
org.apache.hop.ui.hopgui.file.workflow.HopWorkflowFileType.openFile(HopWorkflowFileType.java:151)
at
org.apache.hop.ui.hopgui.delegates.HopGuiFileDelegate.fileOpenWithType(HopGuiFileDelegate.java:163)
at
org.apache.hop.ui.hopgui.delegates.HopGuiAuditDelegate.openLastFilesInternal(HopGuiAuditDelegate.java:198)
at
org.apache.hop.ui.hopgui.delegates.HopGuiAuditDelegate.openLastFiles(HopGuiAuditDelegate.java:92)
at
org.apache.hop.projects.gui.ProjectsGuiPlugin.enableHopGuiProject(ProjectsGuiPlugin.java:268)
at
org.apache.hop.projects.gui.ProjectsGuiPlugin.selectProject(ProjectsGuiPlugin.java:1056)
at
org.apache.hop.projects.gui.ProjectsGuiPlugin.lambda$3(ProjectsGuiPlugin.java:890)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5865)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1656)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4515)
at org.apache.hop.ui.hopgui.HopGui.open(HopGui.java:879)
at org.apache.hop.ui.hopgui.HopGui.main(HopGui.java:697)
at org.apache.hop.ui.hopgui.HopCommandGui.run(HopCommandGui.java:84)
at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at
picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2423)
at
picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2425)
at picocli.CommandLine.execute(CommandLine.java:2174)
at org.apache.hop.hop.Hop.main(Hop.java:162)
Caused by: java.lang.NullPointerException: Cannot invoke "Object.getClass()"
because "valueObject" is null
at
org.apache.hop.metadata.serializer.xml.XmlMetadataUtil.serializeMapValueToXml(XmlMetadataUtil.java:583)
at
org.apache.hop.metadata.serializer.xml.XmlMetadataUtil.serializeMapToXml(XmlMetadataUtil.java:556)
at
org.apache.hop.metadata.serializer.xml.XmlMetadataUtil.serializeMapValueToXml(XmlMetadataUtil.java:594)
at
org.apache.hop.metadata.serializer.xml.XmlMetadataUtil.serializeMapToXml(XmlMetadataUtil.java:556)
at
org.apache.hop.metadata.serializer.xml.XmlMetadataUtil.serializeObjectToXml(XmlMetadataUtil.java:471)
at
org.apache.hop.metadata.serializer.xml.XmlMetadataUtil.serializeFieldValueToXml(XmlMetadataUtil.java:417)
at
org.apache.hop.metadata.serializer.xml.XmlMetadataUtil.serializeObjectToXml(XmlMetadataUtil.java:317)
at
org.apache.hop.metadata.serializer.xml.XmlMetadataUtil.serializeObjectToXml(XmlMetadataUtil.java:256)
at
org.apache.hop.core.undo.XmlSnapshotUndo.captureSnapshot(XmlSnapshotUndo.java:115)
... 28 more
```
### Issue Priority
Priority: 2
### Issue Component
Component: Hop Gui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]