Search code examples
javawindowslaunchjava-9repast-simphony

Problems with Repast Model Launch


After a fresh install of Repast Symphony 2.5.0 (Win 64bit) and JDK 9.0.1 on a Windows 10 system, when importing a JZombies_Demo example, the model cannot be launched with the default configuration.

The error says:

    An internal error occurred during: "Launching JZombies_Demo Model".
    org.codehaus.groovy.eclipse.core.builder.GroovyClasspathContainer.<init>(Lorg/eclipse/core/resources/IProject;)V

When I edit the default run configuration, in the Dependencies tab I see only the JRE System Library and nothing else. In the same tab, the Restore Default Entries is enabled - when I press it all the dependencies from Repast Symphony are added, and the previous error disappears. However, in this case when trying to launch another error is observed:

     saf.core.runtime.Boot - null
     java.lang.NullPointerException
     at saf.core.runtime.Boot.init(Boot.java:79)
     at saf.core.runtime.Boot.main(Boot.java:246)
     at repast.simphony.runtime.RepastMain.main(RepastMain.java:43)

I also read about this problem on Repast Mailing List, and saw people talking about missing boot.properties file in the X\eclipse\plugins\repast.simphony.runtime_2.5.0 folder. However, the file is well in place there. So, I tried to link this to the previous error and saw that at (RepastMain.java:43) the pathInfo value was actually X\eclipse\plugins\repast.simphony.bin_and_src_2.5.0. Thus I tried to copy the boot.properties from the runtime directory to the bin_and_src - this removed the previous error, but brought a number of warnings related to UI initialization and an error:

     repast.simphony.ui.RSUIPlugin - Fatal error starting Repast
     java.lang.NoSuchMethodError: com.jgoodies.forms.layout.ColumnSpec.createGap(Lcom/jgoodies/forms/layout/ConstantSize;)Lcom/jgoodies/forms/layout/ColumnSpec;
at com.jgoodies.forms.layout.FormSpecs.<clinit>(FormSpecs.java:115)
at repast.simphony.ui.RunOptionsPanel.initComponents(RunOptionsPanel.java:114)
at repast.simphony.ui.RunOptionsPanel.<init>(RunOptionsPanel.java:39)
at repast.simphony.ui.RSGui.addRunOptionsView(RSGui.java:558)
at repast.simphony.ui.RSApplication.initGui(RSApplication.java:655)
at repast.simphony.ui.RSAppConfigurator.fillBars(RSAppConfigurator.java:52)
at saf.core.ui.GUICreatorDelegate.createDisplay(GUICreatorDelegate.java:160)
at saf.core.ui.GUICreator.createDisplay(GUICreator.java:12)
at repast.simphony.ui.RSUIPlugin$1.run(RSUIPlugin.java:102)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue.access$500(Unknown Source)
at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

After seeing all that, enough frustration, and tries to reinstall the Repast and JDK the situation remained unchanged. Also need to note, that the same behavior is observed for other examples, and newly created Repast projects.

Would be very glad to hear your opinions on what can cause such Repast behavior.


Solution

  • It looks like this is an issue with Java 9 compatibility. Can you try a fresh install using the latest Java 8? In the meantime we'll follow up on what changes in Repast Simphony will be needed for Java 9 compatibility.