Skip to content

NoClassDefFound error while running example code #48

Description

@sapanparikh18

When running the example code exactly as in the read me file I am getting the following exception


        java.lang.NoClassDefFoundError: Could not initialize class edu.umd.cs.findbugs.ba.AnalysisContext
	at edu.umd.cs.findbugs.FindBugs2.clearCaches(FindBugs2.java:347)
	at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:327)
	at guru.nidi.codeassert.findbugs.FindBugsAnalyzer.analyze(FindBugsAnalyzer.java:50)
	at code.scan.CodeQualityTest.findBugs(CodeQualityTest.java:31)
	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 org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:515)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:105)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)


It's a multi build Gradle project with dependencies set like the following

subprojects { subproject ->
    apply plugin: "java"
    apply plugin: 'checkstyle'
    dependencies {
        testImplementation 'guru.nidi:code-assert:0.9.15'
        testCompile("org.assertj:assertj-core:3.11.1")

    }
...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions