lambdaisland / lambdaisland/kaocha-cloverage

NullPointerException

Open
#24 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
40
Forks
14
PR merge metrics
No merged PRs in 30d

Description

I turned on cloverage with a new repo and got this stacktrace. Any ideas? Works on a bunch of other repos we have.

java.lang.NullPointerException: Cannot invoke "java.lang.ClassLoader.getResources(String)" because the return value of "java.lang.Class.getClassLoader()" is null
 at kaocha.plugin.cloverage$run_cloverage.invokeStatic (cloverage.clj:145)
    kaocha.plugin.cloverage$run_cloverage.invoke (cloverage.clj:139)
    kaocha.plugin.cloverage$cloverage_main_hook.invokeStatic (cloverage.clj:185)
    kaocha.plugin.cloverage$cloverage_main_hook.invoke (cloverage.clj:154)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invokeStatic (core.clj:669)
    clojure.core$apply.invoke (core.clj:662)
    kaocha.plugin$run_hook_STAR_$fn__2305.invoke (plugin.clj:91)
    clojure.lang.PersistentVector.reduce (PersistentVector.java:343)
    clojure.core$reduce.invokeStatic (core.clj:6885)
    clojure.core$reduce.invoke (core.clj:6868)
    kaocha.plugin$run_hook_STAR_.invokeStatic (plugin.clj:89)
    kaocha.plugin$run_hook_STAR_.doInvoke (plugin.clj:88)
    clojure.lang.RestFn.invoke (RestFn.java:445)
    clojure.lang.AFn.applyToHelper (AFn.java:160)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.core$apply.invokeStatic (core.clj:673)
    clojure.core$apply.invoke (core.clj:662)
    kaocha.plugin$run_hook.invokeStatic (plugin.clj:100)
    kaocha.plugin$run_hook.doInvoke (plugin.clj:99)
    clojure.lang.RestFn.invoke (RestFn.java:425)
    kaocha.runner$run$fn__3340.invoke (runner.clj:130)
    clojure.lang.AFn.applyToHelper (AFn.java:152)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$with_bindings_STAR_.invokeStatic (core.clj:1990)
    clojure.core$with_bindings_STAR_.doInvoke (core.clj:1990)
    clojure.lang.RestFn.invoke (RestFn.java:425)
    kaocha.runner$run.invokeStatic (runner.clj:129)
    kaocha.runner$run.invoke (runner.clj:72)
    kaocha.runner$_main_STAR_.invokeStatic (runner.clj:165)
    kaocha.runner$_main_STAR_.doInvoke (runner.clj:143)
    clojure.lang.RestFn.invoke (RestFn.java:397)
    clojure.lang.AFn.applyToHelper (AFn.java:152)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:662)
    kaocha.runner$_main.invokeStatic (runner.clj:176)
    kaocha.runner$_main.doInvoke (runner.clj:174)
    clojure.lang.RestFn.invoke (RestFn.java:397)

Running lein 2.11.2 and java 17.0.13.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in cloverage.clj around line 145, where run-cloverage appears in the stack trace, and reproduce the failure with a new repository using Leiningen 2.11.2 and Java 17. Trace the class-loader lookup and verify that Cloverage runs without the NullPointerException and completes coverage generation.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, java
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.