Hi,
I am trying to perform the ./gradlew build
of a bnd workspace in Docker for build automation purposes, but it fails. Locally, the gradle build works fine and produces a working JAR, just in Docker is giving me problems. When I add --debug, I find it has some trouble when downloading and unpacking a particular JAR, which comes from a p2 repository configured in the bnd project.
This is the log:
2023-12-01T17:28:19.261+0000 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@7919cdcb6 pairs: {GET /modeling/emf/emf/builds/release/2.26/plugins/org.eclipse.emf.edit_2.16.0.v20190920-0401.jar.pack.gz HTTP/1.1: null}{Accept-Encoding: deflate, gzip}{User-Agent: Java/17.0.9}{Host: download.eclipse.org}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
2023-12-01T17:28:19.622+0000 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@7a5f27ad18 pairs: {null: HTTP/1.1 200 OK}{Server: nginx}{Date: Fri, 01 Dec 2023 17:27:39 GMT}{Content-Type: application/x-gzip}{Content-Length: 98976}{Connection: keep-alive}{Keep-Alive: timeout=50}{Last-Modified: Mon, 31 May 2021 05:26:57 GMT}{ETag: "182a0-5c3997966e004"}{X-NodeID: download1}{Content-Security-Policy: frame-ancestors 'self'}{X-Frame-Options: SAMEORIGIN}{strict-transport-security: max-age=63072000; includeSubDomains; preload}{Cache-Control: private, max-age=8m, no-transform}{X-Content-Type-Options: nosniff}{X-XSS-protection: 1; mode=block}{X-Proxy-Cache: MISS}{Accept-Ranges: bytes}
2023-12-01T17:28:19.622+0000 [DEBUG] [aQute.bnd.http.HttpClient] result TaggedData [tag="182a0-5c3997966e004", code=200, modified=Mon May 31 05:26:57 UTC 2021, url=https://download.eclipse.org/modeling/emf/emf/builds/release/2.26/plugins/org.eclipse.emf.edit_2.16.0.v20190920-0401.jar.pack.gz, state=UPDATED]
2023-12-01T17:28:20.088+0000 [DEBUG] [aQute.bnd.build.LoggingProgressPlugin] Finished
2023-12-01T17:28:20.089+0000 [DEBUG] [aQute.bnd.http.URLCache] Unlocking url cache https://download.eclipse.org/modeling/emf/emf/builds/release/2.26/plugins/org.eclipse.emf.edit_2.16.0.v20190920-0401.jar.pack.gz
2023-12-01T17:28:20.090+0000 [DEBUG] [aQute.p2.packed.Unpack200] Calling: null /root/.bnd/urlcache/shas/C713B1C0192942E9BDABA9F85BDA25F79DB01310.content.original /root/.bnd/urlcache/shas/C713B1C0192942E9BDABA9F85BDA25F79DB01310.content
2023-12-01T17:28:20.090+0000 [DEBUG] [aQute.libg.command.Command] executing cmd: [null, /root/.bnd/urlcache/shas/C713B1C0192942E9BDABA9F85BDA25F79DB01310.content.original, /root/.bnd/urlcache/shas/C713B1C0192942E9BDABA9F85BDA25F79DB01310.content]
2023-12-01T17:28:20.091+0000 [DEBUG] [aQute.bnd.util.repository.DownloadListenerPromise] Xtext-4: get org.eclipse.emf.edit;2.16.0.v20190920-0401 https://download.eclipse.org/modeling/emf/emf/builds/release/2.26/plugins/org.eclipse.emf.edit_2.16.0.v20190920-0401.jar.pack.gz: failure
java.lang.RuntimeException: java.lang.NullPointerException
at aQute.p2.packed.Unpack200.unpack(Unpack200.java:92)
at aQute.p2.packed.Unpack200.unpackAndLinkIfNeeded(Unpack200.java:104)
at aQute.bnd.repository.p2.provider.P2Indexer.lambda$get$0(P2Indexer.java:117)
at org.osgi.util.promise.DeferredPromiseImpl$Map.accept(DeferredPromiseImpl.java:500)
at org.osgi.util.promise.DeferredPromiseImpl.result(DeferredPromiseImpl.java:151)
at org.osgi.util.promise.DeferredPromiseImpl$Map.run(DeferredPromiseImpl.java:492)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.NullPointerException
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1092)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at org.gradle.internal.classpath.Instrumented.start(Instrumented.java:330)
at aQute.libg.command.Command.execute(Command.java:113)
at aQute.libg.command.Command.execute(Command.java:52)
at aQute.p2.packed.Unpack200.unpack(Unpack200.java:84)
... 8 more
Any idea why this happens and how to solve it?