Closed jen-boyd closed 1 year ago
Hi Jen, unfortunately I do not have a lot of experience with the NetLogo r-extension. Did you by any chance find a solution to the problem? I was also wondering if this error only comes up when the model is started from nlrx, or if it also shows up when the model is executed within NetLogo.
Hi,
I actually switched to using the csv extension instead of the r-extension and it worked completely fine!
Thanks, Jen
Dr Jennifer Boyd Research Assistant, Systems Science in Public Health Programme MRC/CSO Social and Public Health Sciences Unit School of Health and Wellbeing University of Glasgow Clarice Pears Building 90 Byres Road Glasgow, G12 8TB E: @.*** www.glasgow.ac.uk/sphsuhttp://www.glasgow.ac.uk/sphsu @theSPHSU
From: nldoc @.> Sent: 11 May 2023 14:58 To: ropensci/nlrx @.> Cc: Jennifer Boyd @.>; Author @.> Subject: Re: [ropensci/nlrx] Error while initializing extension. Error is: org.nlogo.api.ExtensionException: Error in R-Extension: Error in runOnce (Error #04) (Issue #66)
Hi Jen, unfortunately I do not have a lot of experience with the NetLogo r-extension. Did you by any chance find a solution to the problem? I was also wondering if this error only comes up when the model is started from nlrx, or if it also shows up when the model is executed within NetLogo.
— Reply to this email directly, view it on GitHubhttps://github.com/ropensci/nlrx/issues/66#issuecomment-1544037931, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZVGA7RI5IHJBGBWT72FRCLXFTV7RANCNFSM5ZCYZOZA. You are receiving this because you authored the thread.Message ID: @.***>
Great to hear that you found a working solution 👍 I will close the issue then. Thanks for reporting :)
When I try to use the nlrx package to calibrate my ABM in NetLogo it was initially continually running and not producing any results as described in a previous issue: https://github.com/ropensci/nlrx/issues/24
I used this solution detailed in the link above and put "r:stop" in the idfinal line and now when I run it I get the following error message:
Error while initializing extension. Error is: org.nlogo.api.ExtensionException: Error in R-Extension: Error in runOnce ("Error #04"): java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap') Exception in thread "main" Error in R-Extension: Error in runOnce ("Error #04"): java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap') at position 15 in at org.nlogo.core.ErrorSource.signalError(ErrorSource.scala:11) at org.nlogo.workspace.ExtensionManager.importExtension(ExtensionManager.scala:178) at org.nlogo.parse.StructureParser$.$anonfun$parsingWithExtensions$1(StructureParser.scala:74) at org.nlogo.parse.StructureParser$.$anonfun$parsingWithExtensions$1$adapted(StructureParser.scala:68) at scala.collection.immutable.List.foreach(List.scala:431) at org.nlogo.parse.StructureParser$.parsingWithExtensions(StructureParser.scala:68) at org.nlogo.parse.StructureParser$.parseSources(StructureParser.scala:33) at org.nlogo.parse.NetLogoParser.basicParse(NetLogoParser.scala:17) at org.nlogo.parse.NetLogoParser.basicParse$(NetLogoParser.scala:15) at org.nlogo.parse.FrontEnd$.basicParse(FrontEnd.scala:10) at org.nlogo.parse.FrontEndMain.frontEnd(FrontEnd.scala:26) at org.nlogo.parse.FrontEndMain.frontEnd$(FrontEnd.scala:25) at org.nlogo.parse.FrontEnd$.frontEnd(FrontEnd.scala:10) at org.nlogo.compile.CompilerMain$.compile(CompilerMain.scala:47) at org.nlogo.compile.Compiler.compileProgram(Compiler.scala:54) at org.nlogo.headless.HeadlessModelOpener.openFromModel(HeadlessModelOpener.scala:50) at org.nlogo.headless.HeadlessWorkspace.openModel(HeadlessWorkspace.scala:539) at org.nlogo.headless.HeadlessWorkspace.open(HeadlessWorkspace.scala:506) at org.nlogo.headless.Main$.newWorkspace$1(Main.scala:18) at org.nlogo.headless.Main$.runExperiment(Main.scala:21) at org.nlogo.headless.Main$.$anonfun$main$1(Main.scala:12) at org.nlogo.headless.Main$.$anonfun$main$1$adapted(Main.scala:12) at scala.Option.foreach(Option.scala:407) at org.nlogo.headless.Main$.main(Main.scala:12) at org.nlogo.headless.Main.main(Main.scala)
Any ideas as to where I'm going wrong?
Thanks, Jen