Hello, when I using //depe or @file:DependsOn I get NoClassDefFoundError
See original GitHub issueI am using Android Studio (mac): 3.4.2, kotlin: kotlinc-jvm 1.3.41 (JRE 12.0.1+12)
[kscript] Resolving dependencies...
[kscript] Resolving de.mpicbg.scicomp:kutils:0.4...Exception in thread "main" java.lang.NoClassDefFoundError: org/ietf/jgss/GSSException
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.<clinit>(NettyAsyncHttpProvider.java:177)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector.getDefaultProvider(AsyncRepositoryConnector.java:246)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector.getProvider(AsyncRepositoryConnector.java:241)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector.<init>(AsyncRepositoryConnector.java:154)
at org.sonatype.aether.connector.async.AsyncRepositoryConnectorFactory.newInstance(AsyncRepositoryConnectorFactory.java:106)
at org.sonatype.aether.impl.internal.DefaultRemoteRepositoryManager.getRepositoryConnector(DefaultRemoteRepositoryManager.java:346)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:191)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:333)
at com.jcabi.aether.Aether.fetch(Aether.java:228)
at com.jcabi.aether.Aether.resolve_aroundBody2(Aether.java:180)
at com.jcabi.aether.Aether$AjcClosure3.run(Aether.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:208)
at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1)
at com.jcabi.aspects.aj.MethodLogger.wrapClass(MethodLogger.java:136)
at com.jcabi.aether.Aether.resolve(Aether.java:177)
at com.jcabi.aether.Aether.resolve_aroundBody0(Aether.java:163)
at com.jcabi.aether.Aether$AjcClosure1.run(Aether.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:208)
at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1)
at com.jcabi.aspects.aj.MethodLogger.wrapClass(MethodLogger.java:136)
at com.jcabi.aether.Aether.resolve(Aether.java:156)
at kscript.app.DependencyUtilKt.resolveDependenciesViaAether(DependencyUtil.kt:86)
at kscript.app.DependencyUtilKt.resolveDependencies(DependencyUtil.kt:53)
at kscript.app.KscriptKt.main(Kscript.kt:158)
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:567)
at org.jetbrains.kotlin.runner.AbstractRunner.run(runners.kt:61)
at org.jetbrains.kotlin.runner.Main.run(Main.kt:110)
at org.jetbrains.kotlin.runner.Main.main(Main.kt:120)
Caused by: java.lang.ClassNotFoundException: org.ietf.jgss.GSSException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 38 more
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7
Top Results From Across the Web
Hello, when I using //depe or @file:DependsOn I get ... - GitHub
I am using Android Studio (mac): 3.4.2, kotlin: kotlinc-jvm 1.3.41 (JRE 12.0.1+12) [kscript] Resolving dependencies.
Read more >How can I solve "java.lang.NoClassDefFoundError"?
The NoClassDefFoundError indicates that the classloader (in this case java.net. ... Error: Could not find or load main class hello. Exception in thread ......
Read more >How to Resolve the NoClassDefFoundError in Java - Rollbar
NoClassDefFoundError is a Java error that occurs when the JVM is unable to find a class at runtime which was available at compile-time....
Read more >How to Fix java.lang.NoClassDefFoundError? - Data Analytics
In this model, the “AppClassLoader” delegates the parent classloader (Extension classloader) to find the class (in ext directory) which then ...
Read more >3 ways to solve java.lang.NoClassDefFoundError in Java J2EE
Hi, I'm not a programmer just a regular user of an iMAC. I have application I use to download data from a console...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tyzero try to use jdk8
I’ve narrowed it down somehow. It seems to be a classloader problem. When running kscript with java instead of kotlin it does not give any error when using java11. So naively, I don’t think any longer that is is caused by the module system.
It might be fixed along with https://youtrack.jetbrains.com/issue/KT-26624 which addressed similar class loader problems. I’ll test it with a kotlin EAP build asap.