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.

NullPointerException in createErrFileBlocking

See original GitHub issue

steps

bazel-multiversion resolves 1000+ dependencies in parallel. This used to work ok for Coursier 2.0.0

problem

I tried to upgrade to the latest, and I am hitting NullPointerException:

java.lang.NullPointerException
	at java.util.Objects.requireNonNull(Objects.java:221)
	at java.nio.file.Files.write(Files.java:3422)
	at coursier.cache.internal.Downloader.createErrFileBlocking$1(Downloader.scala:529)
	at coursier.cache.internal.Downloader.$anonfun$remoteKeepErrors$2(Downloader.scala:540)
	at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)
	at scala.util.Success.$anonfun$map$1(Try.scala:255)
	at scala.util.Success.map(Try.scala:213)
	at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
	at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
	at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(Thread.java:834)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)

expectations

No errors.

notes

I wonder if there are multiple threads trying to write to the same file. If this is for caching purpose, could we ignore the error?

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
eed3si9ncommented, Nov 14, 2022

Another thing to note is that this error only happened on Linux, but was ok on macOS. Upgrading to GraalVM 22.0 seems to have fixed the issue. Thanks for the hint.

0reactions
eed3si9ncommented, Nov 14, 2022

That might be a native image issue

Interesting. And yes, bazel-multiversion uses GraalVM Native Image. Let me try updating the toolchain to see if that would make any difference.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.nullpointerexception error when creating a filter
The java. lang. nullpointerexception error is thrown due to a mismatch in the filter configuration file. To resolve this issue, ensure the hits....
Read more >
How to solve java.lang.NullPointerException error? [duplicate]
A NullPointerException means that one of the variables you are passing is null, but the code tries to use it like it is...
Read more >
Understand And Fix A Java Null Pointer Exception ... - YouTube
Learn what a Java NullPointerException is and how to fix it with variables and arrays.java.lang. nullpointerexception error solution.
Read more >
What is a NullPointerException, and how do I fix it? - YouTube
... and how do I fix it?# NullPointerException exception occurred when you are trying to get something from null referenced object...
Read more >
Null Pointer Exception Java Fix - YouTube
Full Java Course: https://course.alexlorenlee.com/courses/learn-java-fastIf you want to be a Software Engineer, I HIGHLY RECOMMEND applying ...
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