Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal exception with malformed MessageCenter.log4j.properties file #84

Open
etatara opened this issue Mar 20, 2023 · 2 comments
Open

Fatal exception with malformed MessageCenter.log4j.properties file #84

etatara opened this issue Mar 20, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@etatara
Copy link
Member

etatara commented Mar 20, 2023

If the MessageCenter.log4j.properties file in the project root is out of date or malformed in some way, the runtime will throw an exception. This can happen with the GUI runtime and in batch. We should perform input validation on the MessageCenter.log4j.properties file and use a default configuration if missing, and throw a warning instead.

The MessageCenter.log4j.properties can be out of data from a Repast 1.x model or user-edited incorrectly, so we should account for multiple paths that can corrupt the file.

@etatara etatara added the Bug label Mar 20, 2023
@etatara etatara self-assigned this Mar 20, 2023
@etatara
Copy link
Member Author

etatara commented Mar 20, 2023

Stack trace from a batch run:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
      at repast.simphony.batch.gui.BatchConfigMediator.<init>(BatchConfigMediator.java:85)
      at repast.simphony.batch.gui.BatchConfigMediator.<init>(BatchConfigMediator.java:77)
      at repast.simphony.batch.gui.MainPanel.<init>(MainPanel.java:27)
      at repast.simphony.batch.gui.ShowBatchDialog.actionPerformed(ShowBatchDialog.java:38)
      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.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
      at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
      at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
      at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
      at java.desktop/java.awt.Component.processEvent(Component.java:6400)
      at java.desktop/java.awt.Container.processEvent(Container.java:2263)
      at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
      at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
      at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
      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:4843)
      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)

@etatara
Copy link
Member Author

etatara commented Mar 20, 2023

Possible source location of error in batch:

@etatara etatara added this to the v.2.11.0 milestone Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant