Netlogo NW extension & loops in Openmole

network

(Aymericvie) #1

Hello,

I am trying to run a Sobol Sampling task on a Netlogo model. No issues with the Sobol code on itself. However, I encounter InternalProcessingError after a few seconds of running.

org.openmole.core.exception.InternalProcessingError: Error in netlogo@343662982 for context values {alpha=0.0, collapse_recovery=0.0, confidence_ratio=0.0, deliberative_module=1.0, div=5.0, emotion_module=0.0, initial_pollution=0.0, lake_threshold=1.0, natural_decay=0.0, openmole$seed=5833910021486878213, population=3.0, reach=0.0, seed=0, social_module=1.0, variance_signal=0.0, variance_threshold=0.0}

I have activated embeddworkspace (true) in the line:

val netlogo = NetLogo6Task(workDirectory / “multi_layer_model_nw.nlogo”, launch, embedWorkspace = true, seed=seed) set(

val netlogo = NetLogo6Task(workDirectory / “multi_layer_model_nw.nlogo”, launch, embedWorkspace = true, seed=seed) set(

The error script tells me Caused by: java.lang.NoClassDefFoundError: org/openide/util/Lookup
The model runs fine in Netlogo, no issues at all. So I don’t understand how to correct the error.
The Sobol sampling works flawless if I remove the nw extension code parts. So I guess the problem is linked with the integration of the nw extension.

Openmole website says " To be able to run a model with extensions, put the extension folder in the same directory as the model source, and activate the option embedWorkspace ." Maybe I’m not interpreting that correctly. In a same folder, I have the .oms, the .nlogo, and another folder titled “nw” and inside this folder all the .jar files. The script displays the same error if I put the .jar files directly in the same folder as the .oms and .nlogo files.

Many thanks in advance for your help.
Best,
Aymeric

Caused by: java.lang.NoClassDefFoundError: org/openide/util/Lookup
at org.nlogo.extensions.nw.gephi.GephiUtils$.$anonfun$shutdownStupidExtraThreads$1(GephiUtils.scala:33)
at org.nlogo.extensions.nw.gephi.GephiUtils$.withClassLoaderContext(GephiUtils.scala:16)
at org.nlogo.extensions.nw.gephi.GephiUtils$.$anonfun$withNWLoaderContext$1(GephiUtils.scala:10)
at org.nlogo.extensions.nw.gephi.GephiUtils$.shutdownStupidExtraThreads(GephiUtils.scala:33)
at org.nlogo.extensions.nw.NetworkExtension.unload(NetworkExtension.scala:41)
at org.nlogo.workspace.ExtensionManager$JarContainer.unload(ExtensionManager.scala:97)
at org.nlogo.workspace.ExtensionManager.$anonfun$reset$1(ExtensionManager.scala:293)
at org.nlogo.workspace.ExtensionManager.$anonfun$reset$1$adapted(ExtensionManager.scala:292)
at scala.collection.Iterator.foreach(Iterator.scala:929)
at scala.collection.Iterator.foreach$(Iterator.scala:929)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
at scala.collection.MapLike$DefaultValuesIterable.foreach(MapLike.scala:210)
at org.nlogo.workspace.ExtensionManager.reset(ExtensionManager.scala:292)
at org.nlogo.workspace.AbstractWorkspace.dispose(AbstractWorkspace.java:85)
at org.nlogo.workspace.AbstractWorkspaceScala.org$nlogo$workspace$Components$$super$dispose(AbstractWorkspaceScala.scala:24)
at org.nlogo.workspace.Components.dispose(Components.scala:59)
at org.nlogo.workspace.Components.dispose$(Components.scala:58)
at org.nlogo.workspace.AbstractWorkspaceScala.dispose(AbstractWorkspaceScala.scala:24)
at org.openmole.plugin.tool.netlogo6.NetLogo6.dispose(NetLogo6.java:85)
at org.openmole.plugin.task.netlogo.NetLogoTask$.destroyInstance$1(NetLogoTask.scala:122)
at org.openmole.plugin.task.netlogo.NetLogoTask$.$anonfun$createPool$2(NetLogoTask.scala:127)
at org.openmole.plugin.task.netlogo.NetLogoTask$.$anonfun$createPool$2$adapted(NetLogoTask.scala:127)
at org.openmole.tool.cache.WithNewInstance.apply(Pool.scala:45)
at org.openmole.plugin.task.netlogo.NetLogoTask.$anonfun$process$1(NetLogoTask.scala:285)
at org.openmole.core.expansion.FromContext$$anon$8.from(FromContext.scala:202)
at org.openmole.core.workflow.tools.InputOutputCheck$.$anonfun$perform$1(InputOutputCheck.scala:123)
… 15 more
Caused by: java.lang.ClassNotFoundException: org.openide.util.Lookup
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:899)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
… 41 more


#2

Could you try to add this jar in your extension directory: http://nextcloud.openmole.org/s/soAq8NMcED8yCzk


(Aymericvie) #3

Hello,
Thank you for this advice.

This component was already in the nw directory but I have added it anyway. Sadly, I get the same error message.

Best,

Aymeric

Le dim. 19 mai 2019 à 01:45, reuillon noreply@iscpif.fr a écrit :


#4

Could you send me your project? (The full directory, with the oms, nlogo and plugins)


(Aymericvie) #5

Hello,
I have sent you the full project by email (we transfer).

Thanks.

Best,

Aymeric

Le dim. 19 mai 2019 à 16:36, reuillon noreply@iscpif.fr a écrit :