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.

When used in gradle plugin, it throws Unable to load class 'io.github.classgraph.ClassGraph'

See original GitHub issue

Hi,

I’m using the ClassGraph library inside a custom gradle plugin: https://github.com/RoRoche/plantuml-gradle-plugin/tree/feature/using_classgraph

It’s OK during unit testing and while releasing into local Maven and used in another project.

But since it has been released to gradle plugin portal (https://plugins.gradle.org/plugin/com.github.roroche.plantuml), when using inside another project (https://github.com/RoRoche/eo-plantuml-builder), when running my buildClassDiagram task, it throws

* What went wrong:
Execution failed for task ':buildClassDiagram'.
> Lio/github/classgraph/ClassGraph;

Any idea of what’s going wrong? Gradle plugin packaging?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

0reactions
lukehutchcommented, May 7, 2020

Glad you solved it, @RoRoche!

Thanks for all the help, @thc202! I really don’t know anything about Gradle, so couldn’t have come up with the solution easily. Not many community members jump in on bug reports – I’m curious how you saw this bug and decided to help resolve the issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom gradle plugin throws Unable to load class 'io.github ...
Seeing stacktrace, it seems that plantuml doesn't have access to ClassGraph, classpath problem ? Maybe issue on reflection use or initialization ...
Read more >
Custom gradle plugin throws Unable to load ... - Gradle Forums
I'm using the ClassGraph library inside a custom gradle plugin: https://github.com/RoRoche/plantuml-gradle-plugin It's OK during unit ...
Read more >
nonapi/io/github/classgraph/utils/FileUtils$3 · Issue #331
The order in which classloaders should be asked to load classes seems to be very different depending on what the exact runtime environment...
Read more >
Error while running mvn test target: java.lang ... - GitHub
We're using maven-surefire-plugin v.2.22.2 . Having had a quick look, it does appear that io.github.classgraph.ClassGraph.rejectPackages still exists ...
Read more >
OOM while loading classpath with large JAR files #338 - GitHub
I managed to write a plugin for Gradle and get all JARs associated with a project once build is finished, and then call...
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