question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

facing classloader issue with gradle

See original GitHub issue
io.fabric8.kubernetes.client.KubernetesClientException: No httpclient implementations found on the context classloader, please ensure your classpath includes an implementation jar
    at io.fabric8.kubernetes.client.utils.HttpClientUtils.getHttpClientFactory(HttpClientUtils.java:164)
    at io.fabric8.kubernetes.client.KubernetesClientBuilder.build(KubernetesClientBuilder.java:76)
    at com.metalbear.mirrord.KubeDataProvider.<init>(KubeDataProvider.kt:8)
    at com.metalbear.mirrord.MirrordListener.processStartScheduled$lambda-3(MirrordListener.kt:43)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
    at ...

just added the dependency like so:

dependencies {
    implementation("com.github.zafarkhaja:java-semver:0.9.0")
    implementation("io.fabric8:kubernetes-client:6.2.0") {
        exclude(group = "org.slf4j", module = "slf4j-api")
    }
}

Would really appreciate any solutions, thanks

_Originally posted by @infiniteregrets in https://github.com/fabric8io/kubernetes-client/issues/4248#issuecomment-1304583337_

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
infiniteregretscommented, Nov 7, 2022

it worked for when i did

Thread.currentThread().contextClassLoader = JdkHttpClientFactory::class.java.classLoader

on init and added implementation("io.fabric8:kubernetes-httpclient-jdk:6.2.0") as a dependency

0reactions
infiniteregretscommented, Nov 22, 2022

@sunix is there a solution then?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Accessing the runtime classloader from the gradle build script
I'm trying to use a code generation library from my Gradle build script, but i'm facing an error - I don't seem to...
Read more >
Apply Plugin in Apply From can't see outer Classpath because ...
gradle. Given that in java classes from different classloaders are not equal the instanceof fails to match. ... My constraint is that I'm...
Read more >
Native Script App build : Issue facing while gradle build
I have created a native script application and trying to build using tns command(tns build android) and facing the below issue:.
Read more >
couldn't initialize class org.gradle.internal.classloader ...
I would try to disable the antivirus/firewall. Or make sure that IDE settings directories IDE installation home and project files, Gradle and JDK...
Read more >
Understanding Gradle plugins: the provider API
We discovered a couple of issues: the plugin is adding repositories transparently to the build, in particular Jitpack.io and an internal ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found