NullPointerException during resolution
See original GitHub issueHi.
I’m using the sbt coursier plugin 1.0.0-M14-8
and sometimes when I’m trying to run sbt task
I get this:
$ sbt stage
[info] Loading global plugins from /home/claudio/.sbt/0.13/plugins
[info] Loading project definition from /home/claudio/src/search/project
[info] Updating search-build
[info] Resolved search-build dependencies
[info] Fetching artifacts of search-build
[info] Fetched artifacts of search-build
[info] Compiling 1 Scala source to /home/claudio/src/search/project/target/scala-2.10/sbt-0.13/classes...
[warn] /home/claudio/src/search/project/Build.scala:4: trait Build in package sbt is deprecated: Use .sbt format instead
[warn] object Build extends SbtBuild {
[warn] ^
[warn] one warning found
[info] Set current project to my-search (in build file:/home/claudio/src/search/)
[info] Packaging /home/claudio/src/search/target/scala-2.11/my-search_2.11-1.7.1-tests-sources.jar ...
[info] Packaging /home/claudio/src/search/target/scala-2.11/my-search_2.11-1.7.1-sources.jar ...
[info] Done packaging.
[info] Done packaging.
[info] Updating search
[info] Resolved search dependencies
coursier.ResolutionException: Exception during resolution
Caused by: java.lang.NullPointerException
at coursier.Cache$$anonfun$validateChecksum$1.<init>(Cache.scala:797)
at coursier.Cache$.validateChecksum(Cache.scala:797)
at coursier.Cache$$anonfun$file$1.apply(Cache.scala:885)
at coursier.Cache$$anonfun$file$1.apply(Cache.scala:882)
at scalaz.EitherT$$anonfun$flatMap$1$$anonfun$apply$4.apply(EitherT.scala:93)
at scalaz.$bslash$div.fold(Either.scala:58)
at scalaz.EitherT$$anonfun$flatMap$1.apply(EitherT.scala:93)
at scalaz.EitherT$$anonfun$flatMap$1.apply(EitherT.scala:93)
at scalaz.concurrent.Task$$anonfun$flatMap$1$$anonfun$1.apply(Task.scala:35)
at scalaz.concurrent.Task$$anonfun$flatMap$1$$anonfun$1.apply(Task.scala:35)
at scalaz.concurrent.Task$.Try(Task.scala:457)
at scalaz.concurrent.Task$$anonfun$flatMap$1.apply(Task.scala:35)
at scalaz.concurrent.Task$$anonfun$flatMap$1.apply(Task.scala:33)
at scala.Function1$$anonfun$andThen$1.apply(Function1.scala:55)
at scala.Function1$$anonfun$andThen$1.apply(Function1.scala:55)
at scalaz.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:58)
at scalaz.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:58)
at scalaz.concurrent.Future.step(Future.scala:118)
at scalaz.concurrent.Future.unsafePerformListen(Future.scala:75)
at scalaz.concurrent.Future$$anonfun$unsafePerformListen$1$$anonfun$apply$4.apply(Future.scala:79)
at scalaz.concurrent.Future$$anonfun$unsafePerformListen$1$$anonfun$apply$4.apply(Future.scala:79)
at scalaz.Free$$anonfun$map$1.apply(Free.scala:91)
at scalaz.Free$$anonfun$map$1.apply(Free.scala:91)
at scalaz.Free.resume(Free.scala:109)
at scalaz.Free.go2$1(Free.scala:153)
at scalaz.Free.go(Free.scala:157)
at scalaz.Free.run(Free.scala:263)
at scalaz.concurrent.Future.unsafePerformListen(Future.scala:76)
at scalaz.concurrent.Future$$anonfun$unsafePerformListen$1$$anonfun$apply$4.apply(Future.scala:79)
at scalaz.concurrent.Future$$anonfun$unsafePerformListen$1$$anonfun$apply$4.apply(Future.scala:79)
at scalaz.Free$$anonfun$map$1.apply(Free.scala:91)
at scalaz.Free$$anonfun$map$1.apply(Free.scala:91)
at scalaz.Free.resume(Free.scala:109)
at scalaz.Free.go2$1(Free.scala:153)
at scalaz.Free.go(Free.scala:157)
at scalaz.Free.run(Free.scala:263)
at scalaz.concurrent.Future$$anonfun$apply$15$$anon$3.call(Future.scala:432)
at scalaz.concurrent.Future$$anonfun$apply$15$$anon$3.call(Future.scala:432)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (*:coursierResolution) coursier.ResolutionException: Exception during resolution
Usually, if I try the same command again, it works OK. So probably some kind of race condition?
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
How to Fix and Avoid NullPointerException in Java - Rollbar
The NullPointerException occurs due to a situation in application code where an uninitialized object is attempted to be accessed or modified.
Read more >java - What is a NullPointerException, and how do I fix it?
A null pointer exception is thrown when an application attempts to use null in a case where an object is required.
Read more >How to Resolve the java.lang.NullPointerException? - STechies
The error is raised when the code tries to access a reference variable that points to a null value. It can be resolved...
Read more >How to resolve a NullPointerException in Java? - Tutorialspoint
A NullPointerException is a runtime exception thrown by the JVM when our application code, other referenced API or the middleware encounters ...
Read more >Java NullPointerException - Detect, Fix, and Best Practices
NullPointerException is a runtime exception, so we don't need to catch it in the program. NullPointerException is raised in an application when ...
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
@tarun29061990 I don’t see how this stack trace relates to Coursier.
Facing the same on osx catalina while running ./activator compile