While writing cide for Selenium with Java in intellij, I am getting this error.
This issue is occuring for new projecting. Old projects are working fine.Though I am copying the same data from old project to new project.
Code:
#Test
public void testcase1() throws IOException {
driver = initializeDriver();
driver.manage().window().maximize();
driver.get(props.getProperty("url"));
}
Error:
java.lang.NoClassDefFoundError: org/openqa/selenium/ElementNotSelectableException
at org.openqa.selenium.remote.ErrorCodes.<clinit>(ErrorCodes.java:228)
at org.openqa.selenium.remote.ErrorHandler.<init>(ErrorHandler.java:68)
at org.openqa.selenium.remote.ErrorHandler.<init>(ErrorHandler.java:59)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:113)
at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:108)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:106)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:93)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:48)
at resources.Base.initializeDriver(Base.java:28)
at testcases.HomePageTest.testcase1(HomePageTest.java:15)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:135)
at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:673)
at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:220)
at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:945)
at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:193)
at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:808)
at org.testng.TestRunner.run(TestRunner.java:603)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
at org.testng.SuiteRunner.run(SuiteRunner.java:326)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.runSuites(TestNG.java:1092)
at org.testng.TestNG.run(TestNG.java:1060)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.ElementNotSelectableException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 35 more
It was Dependency issue.Though I had added selenium dependencies in pom.xml file but it did not get added successfully.
So issue was occuring.
If you also get this issue,
Open terminal, navigate till path of the project and execute command "mvn install"
and then run your program.
Related
I am actually working on creating project which wrapped the logback methods.
For this project I had tried to add OnConsoleStatusListener in logback.xml file.
enter image description here
But after running the application I get ClassNotFound exception for OnConsoleStatusListener.
I checked in logback core jar OnConsoleStatusListener is present.
I am created the multimodule project.
Below is the structure.
project structure
So could you please help with this.
error:
ERROR in ch.qos.logback.core.model.processor.StatusListenerModelHandler - Could not create an StatusListener of type [ch.qos.logback.core.status.OnConsoleStatusListener]. ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type ch.qos.logback.core.status.OnConsoleStatusListener
at ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type ch.qos.logback.core.status.OnConsoleStatusListener
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:69)
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:44)
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:33)
at at ch.qos.logback.core.model.processor.StatusListenerModelHandler.handle(StatusListenerModelHandler.java:46)
at at ch.qos.logback.core.model.processor.DefaultProcessor.mainTraverse(DefaultProcessor.java:203)
at at ch.qos.logback.core.model.processor.DefaultProcessor.mainTraverse(DefaultProcessor.java:211)
at at ch.qos.logback.core.model.processor.DefaultProcessor.process(DefaultProcessor.java:104)
at at ch.qos.logback.core.joran.GenericXMLConfigurator.processModel(GenericXMLConfigurator.java:200)
at at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:166)
at at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:122)
at at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:65)
at at ch.qos.logback.classic.util.DefaultJoranConfigurator.configureByResource(DefaultJoranConfigurator.java:53)
at at ch.qos.logback.classic.util.DefaultJoranConfigurator.configure(DefaultJoranConfigurator.java:34)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:98)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:77)
at at ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:50)
at at ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:41)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:183)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:170)
at at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:453)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:439)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:414)
at at com.nishchay.linkedlist.utility.App.(App.java:75)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.status.OnConsoleStatusListener
at at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:604)
at at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:56)
at ... 23 common frames omitted
Hi whenever I try to create a java class or anything on my project I get an unexpected error on my NetBeans, I installed a hibernate plugin which was requesting for freemaker jar version 238 and which after installing the hibernate plugin every time I try to create a java class this is the error I get, thank you in advance for your help.
java.lang.ClassNotFoundException: freemarker.template.Template
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.netbeans.ProxyClassLoader.doFindClass(ProxyClassLoader.java:209)
Caused: java.lang.ClassNotFoundException: freemarker.template.Template starting from ModuleCL#58762fd2[org.netbeans.libs.freemarker] with possible defining loaders null and declared parents [org.netbeans.JarClassLoader#6dedf07b, org.netbeans.MainImpl$BootClassLoader#51efea79, ModuleCL#9e4e8cd[org.netbeans.modules.queries]]
at org.netbeans.ProxyClassLoader.doFindClass(ProxyClassLoader.java:211)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:125)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
Caused: java.lang.NoClassDefFoundError: freemarker/template/Template
at org.netbeans.libs.freemarker.FreemarkerFactory.getScriptEngine(FreemarkerFactory.java:156)
at java.scripting/javax.script.ScriptEngineManager.getEngineByName(ScriptEngineManager.java:241)
at org.netbeans.api.scripting.Scripting$EngineManager.getEngineByName(Scripting.java:180)
at org.netbeans.modules.templates.ScriptingCreateFromTemplateHandler.getEngine(ScriptingCreateFromTemplateHandler.java:141)
at org.netbeans.modules.templates.ScriptingCreateFromTemplateHandler.engine(ScriptingCreateFromTemplateHandler.java:150)
at org.netbeans.modules.templates.ScriptingCreateFromTemplateHandler.accept(ScriptingCreateFromTemplateHandler.java:65)
at org.netbeans.api.templates.CreateFromTemplateImpl.build(CreateFromTemplateImpl.java:113)
at org.netbeans.api.templates.CreateFromTemplateImpl.build(CreateFromTemplateImpl.java:73)
at org.netbeans.api.templates.FileBuilder.build(FileBuilder.java:227)
at org.netbeans.api.templates.FileBuilder.createFromTemplate(FileBuilder.java:329)
at org.openide.loaders.MultiDataObject.handleCreateFromTemplate(MultiDataObject.java:853)
at org.openide.loaders.DataObject$CreateAction.run(DataObject.java:1572)
at org.openide.loaders.DataObjectPool$1WrapAtomicAction.run(DataObjectPool.java:236)
at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:102)
at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:494)
at org.openide.loaders.DataObjectPool.runAtomicAction(DataObjectPool.java:261)
at org.openide.loaders.DataObject.invokeAtomicAction(DataObject.java:1026)
at org.openide.loaders.DataObject.createFromTemplate(DataObject.java:958)
at org.netbeans.modules.java.project.ui.NewJavaFileWizardIterator.instantiate(NewJavaFileWizardIterator.java:340)
at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1050)
at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:602)
at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:436)
at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:223)
at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:135)
at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1605)
at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1546)
at org.openide.WizardDescriptor.access$2300(WizardDescriptor.java:67)
at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2233)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
How can I solve this error
I have updated the kotlin version, still not solving the error.
I have also invalidate cache but error still persist.
e: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't transform method node:
I don't know if this is a gradle issue or kotlin issue.
Any one has an approach to solve this build issues?
File is unknown
The root cause java.lang.AssertionError was thrown at: org.jetbrains.kotlin.codegen.coroutines.CoroutineTransformerMethodVisitor.fixRangeOfLvtRecord(CoroutineTransformerMethodVisitor.kt:335)
at org.jetbrains.kotlin.codegen.TransformationMethodVisitor.visitEnd(TransformationMethodVisitor.kt:92)
at org.jetbrains.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:813)
at org.jetbrains.kotlin.codegen.inline.DeferredMethodVisitor.visitEnd(DeferredMethodVisitor.kt:31)
org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:77)
at org.jetbrains.kotlin.codegen.inline.AnonymousObjectTransformer.inlineMethodAndUpdateGlobalResult(AnonymousObjectTransformer.kt:265)
at org.jetbrains.kotlin.codegen.inline.AnonymousObjectTransformer.doTransform(AnonymousObjectTransformer.kt:152)
at org.jetbrains.kotlin.codegen.inline.MethodInliner$doInline$lambdaInliner$1.handleAnonymousObjectRegeneration(MethodInliner.kt:192)
at org.jetbrains.kotlin.codegen.inline.MethodInliner$doInline$lambdaInliner$1.anew(MethodInliner.kt:216)
at org.jetbrains.org.objectweb.asm.commons.InstructionAdapter.visitTypeInsn(InstructionAdapter.java:472)
at org.jetbrains.org.objectweb.asm.tree.TypeInsnNode.accept(TypeInsnNode.java:77)
at org.jetbrains.org.objectweb.asm.tree.InsnList.accept(InsnList.java:144)
at org.jetbrains.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:792)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:370)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:107)
at org.jetbrains.kotlin.codegen.inline.MethodInliner.doInline(MethodInliner.kt:77)
at org.jetbrains.kotlin.codegen.inline.InlineCodegen.inlineCall(InlineCodegen.kt:251)
at org.jetbrains.kotlin.codegen.inline.InlineCodegen.performInline(InlineCodegen.kt:146)
at org.jetbrains.kotlin.codegen.inline.PsiInlineCodegen.genCallInner(PsiInlineCodegen.kt:67)
at org.jetbrains.kotlin.codegen.CallGenerator$DefaultImpls.genCall(CallGenerator.kt:115)
at org.jetbrains.kotlin.codegen.inline.PsiInlineCodegen.genCall(PsiInlineCodegen.kt:33)
at org.jetbrains.kotlin.codegen.ExpressionCodegen.invokeMethodWithArguments(ExpressionCodegen.java:2656)
at org.jetbrains.kotlin.codegen.ExpressionCodegen.invokeMethodWithArguments(ExpressionCodegen.java:2598)
at org.jetbrains.kotlin.codegen.Callable$invokeMethodWithArguments$1.invoke(Callable.kt:41)
at org.jetbrains.kotlin.codegen.Callable$invokeMethodWithArguments$1.invoke(Callable.kt:13)
at org.jetbrains.kotlin.codegen.OperationStackValue.putSelector(StackValue.kt:79)
at org.jetbrains.kotlin.codegen.StackValue.put(StackValue.java:124)
at org.jetbrains.kotlin.codegen.StackValue.put(StackValue.java:117)
at org.jetbrains.kotlin.codegen.ExpressionCodegen.putStackValue(ExpressionCodegen.java:393)
at org.jetbrains.kotlin.codegen.ExpressionCodegen.gen(ExpressionCodegen.java:374)
at org.jetbrains.kotlin.codegen.ExpressionCodegen.returnExpression(ExpressionCodegen.java:1760)
at org.jetbrains.kotlin.codegen.FunctionGenerationStrategy$FunctionDefault.doGenerateBody(FunctionGenerationStrategy.java:64)
at org.jetbrains.kotlin.codegen.FunctionGenerationStrategy$CodegenBased.generateBody(FunctionGenerationStrategy.java:86)
at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethodBody(FunctionCodegen.java:639)
at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethodBody(FunctionCodegen.java:467)
at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethod(FunctionCodegen.java:249)
at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethod(FunctionCodegen.java:165)
at org.jetbrains.kotlin.codegen.FunctionCodegen.gen(FunctionCodegen.java:136)
at org.jetbrains.kotlin.codegen.MemberCodegen.genSimpleMember(MemberCodegen.java:196)
at org.jetbrains.kotlin.codegen.ClassBodyCodegen.generateDeclaration(ClassBodyCodegen.java:169)
at org.jetbrains.kotlin.codegen.ClassBodyCodegen.generateBody(ClassBodyCodegen.java:89)
at org.jetbrains.kotlin.codegen.MemberCodegen.generate(MemberCodegen.java:128)
at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:301)
at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:285)
at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generateClassesAndObjectsInFile(PackageCodegenImpl.java:119)
at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generateFile(PackageCodegenImpl.java:138)
at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generate(PackageCodegenImpl.java:70)
at org.jetbrains.kotlin.codegen.DefaultCodegenFactory.generatePackage(CodegenFactory.kt:88)
at org.jetbrains.kotlin.codegen.DefaultCodegenFactory.generateModule(CodegenFactory.kt:67)
at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:35)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:616)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:203)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:164)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:51)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:86)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:346)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:102)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:240)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.access$compileIncrementally(IncrementalCompilerRunner.kt:39)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner$compile$2.invoke(IncrementalCompilerRunner.kt:81)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:93)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:601)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:93)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1633)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.AssertionError: Someone else occupies parameter's slot at 2
at org.jetbrains.kotlin.codegen.coroutines.CoroutineTransformerMethodVisitor.fixRangeOfLvtRecord(CoroutineTransformerMethodVisitor.kt:335)
at org.jetbrains.kotlin.codegen.coroutines.CoroutineTransformerMethodVisitor.fixLvtForParameters(CoroutineTransformerMethodVisitor.kt:329)
at org.jetbrains.kotlin.codegen.coroutines.CoroutineTransformerMethodVisitor.performTransformations(CoroutineTransformerMethodVisitor.kt:201)
at org.jetbrains.kotlin.codegen.TransformationMethodVisitor.visitEnd(TransformationMethodVisitor.kt:70)
... 91 more
Caused by: java.lang.AssertionError: Someone else occupies parameter's slot at 2
Here is the build.gradle
dependencies {
classpath "com.android.tools.build:gradle:4.1.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10"
}
The errors are thrown whenever I tried to compile the code
e: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't transform method node:
emit (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;:
i am trying to install scala in vs code but it's not working (or running) and i have this error
this is my code
object assd extends App{
print("dfdfdfdfdf")
}
and this is the error
[Running] scala "c:\Users\ahmed\Desktop\scala\tempCodeRunnerFile.scala"
Exception in thread "main" java.lang.IllegalArgumentException: name
at java.base/jdk.internal.loader.URLClassPath$Loader.getResource(URLClassPath.java:636)
at java.base/jdk.internal.loader.URLClassPath.getResource(URLClassPath.java:314)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:455)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at scala.reflect.internal.util.RichClassLoader$.$anonfun$tryClass$extension$1(ScalaClassLoader.scala:47)
at scala.util.control.Exception$Catch.$anonfun$opt$1(Exception.scala:245)
at scala.util.control.Exception$Catch.apply(Exception.scala:227)
at scala.util.control.Exception$Catch.opt(Exception.scala:245)
at scala.reflect.internal.util.RichClassLoader$.tryClass$extension(ScalaClassLoader.scala:47)
at scala.reflect.internal.util.ScalaClassLoader.tryToLoadClass(ScalaClassLoader.scala:41)
at scala.reflect.internal.util.ScalaClassLoader.tryToLoadClass$(ScalaClassLoader.scala:119)
at scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.tryToLoadClass(ScalaClassLoader.scala:161)
at scala.reflect.internal.util.ScalaClassLoader$.classExists(ScalaClassLoader.scala:189)
at scala.tools.nsc.GenericRunnerCommand.guessHowToRun(GenericRunnerCommand.scala:43)
at scala.tools.nsc.GenericRunnerCommand.<init>(GenericRunnerCommand.scala:62)
at scala.tools.nsc.GenericRunnerCommand.<init>(GenericRunnerCommand.scala:25)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:45)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:108)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
[Done] exited with code=1 in 0.99 seconds
and this is path windowpath window
These are the extensions that I added
scala
code runner
if you use code runner,you can set scala change
"scala": "cd $dir && scala $fileName",
I am trying to use Netlogo via R using the following code:
library(RNetLogo)
my.netlogo1 <- "my.netlogo1"
nl.path <- "C:/Program Files/NetLogo 6.1.1/app"
NLStart(nl.path, gui = FALSE,
nl.obj = my.netlogo1, nl.jarname='netlogo-6.1.1.jar')
And I get the following message:
java.lang.NoClassDefFoundError: org/nlogo/workspace/Controllable
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:416)
Caused by: java.lang.ClassNotFoundException
at RJavaClassLoader.findClass(RJavaClassLoader.java:383)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 2 more
I heard it was because of a compatibility issue with Netlogo6 but that it had now been solved. Could someone say what I'm doing wrong?