Migration Assistant: show path of file that failed to migrate
I often spend a lot of time to identify scenarios that cause the migration assistant to fail (often cases: output folder, or in an untracked file, or in a file from another branch).
Currently, there is only a blank window
and error message
09:55:37,818 ERROR ActionLoadProject:155 - could not loadFromFilesystem project: null
java.lang.NullPointerException
at org.vadere.simulator.projects.io.JsonConverter.deserializeScenarioRunManagerFromNode(JsonConverter.java:56)
at org.vadere.simulator.projects.migration.jsontranformation.AbstractJsonTransformation.addNewMembersWithDefaultValues(AbstractJsonTransformation.java:211)
at org.vadere.simulator.projects.migration.jsontranformation.JsonMigrationAssistant.migrateScenario(JsonMigrationAssistant.java:287)
at org.vadere.simulator.projects.migration.jsontranformation.JsonMigrationAssistant.migrateDirectory(JsonMigrationAssistant.java:203)
at org.vadere.simulator.projects.migration.jsontranformation.JsonMigrationAssistant.analyzeProject(JsonMigrationAssistant.java:61)
at org.vadere.simulator.projects.io.IOVadere.readProject(IOVadere.java:66)
at org.vadere.simulator.projects.io.IOVadere.readProjectJson(IOVadere.java:47)
at org.vadere.gui.projectview.control.ActionLoadProject.loadProjectByPath(ActionLoadProject.java:109)
at org.vadere.gui.projectview.control.ActionLoadProject.loadProjectByPath(ActionLoadProject.java:104)
at org.vadere.gui.projectview.control.ActionLoadProject.loadProject(ActionLoadProject.java:78)
at org.vadere.gui.projectview.control.ActionLoadProject.actionPerformed(ActionLoadProject.java:39)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1020)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1064)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6632)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
at java.desktop/java.awt.Component.processEvent(Component.java:6397)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
which is not really helpful. It would be helpful:
- Which scenario file causes problems? List of them preferred but show first when it fails also ok.
- If not too hard: which attributes could not be migrated?
- Simply not load the scenarios that could not be migrated, but load the scenarios that are valid. (possibly show them in red text in the project).