Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using fast-jar breaks quarkus-container-image-jib in 1.6.0.Final #10711

Closed
fredmtyro opened this issue Jul 14, 2020 · 4 comments
Closed

Using fast-jar breaks quarkus-container-image-jib in 1.6.0.Final #10711

fredmtyro opened this issue Jul 14, 2020 · 4 comments
Labels
area/container-image kind/bug Something isn't working triage/duplicate This issue or pull request already exists

Comments

@fredmtyro
Copy link

Describe the bug
Quarkus 1.6.0.Final jib support fails to build an image when using quarkus.package.type=fast-jar due to library directory changes.

Expected behavior
When using quarkus-container-image-jib and quarkus.package.type=fast-jar the image build succeeds and is pushed to the repository.

Actual behavior
When using quarkus-container-image-jib and quarkus.package.type=fast-jar the image build fails with this trace:

Failed to execute goal io.quarkus:quarkus-maven-plugin:1.6.0.Final:build (default) on project xxxx: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
: Build step io.quarkus.container.image.jib.deployment.JibProcessor#buildFromJar threw an exception: java.lang.RuntimeException: Unable to create container image
	at io.quarkus.container.image.jib.deployment.JibProcessor.containerize(JibProcessor.java:153)
	at io.quarkus.container.image.jib.deployment.JibProcessor.buildFromJar(JibProcessor.java:102)
	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 io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:932)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at org.jboss.threads.JBossThread.run(JBossThread.java:479)
Caused by: java.util.concurrent.ExecutionException: java.nio.file.NoSuchFileException: /app/target/lib
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:552)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:513)
	at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:82)
	at com.google.cloud.tools.jib.builder.steps.PushLayerStep.call(PushLayerStep.java:79)
	at com.google.cloud.tools.jib.builder.steps.PushLayerStep.call(PushLayerStep.java:33)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.nio.file.NoSuchFileException: /app/target/lib
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
	at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:149)
	at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
	at java.base/java.nio.file.Files.readAttributes(Files.java:1763)
	at java.base/java.nio.file.Files.getLastModifiedTime(Files.java:2314)
	at com.google.cloud.tools.jib.cache.LayerEntriesSelector$LayerEntryTemplate.<init>(LayerEntriesSelector.java:77)
	at com.google.cloud.tools.jib.cache.LayerEntriesSelector.toSortedJsonTemplates(LayerEntriesSelector.java:153)
	at com.google.cloud.tools.jib.cache.LayerEntriesSelector.generateSelector(LayerEntriesSelector.java:169)
	at com.google.cloud.tools.jib.cache.Cache.retrieve(Cache.java:182)
	at com.google.cloud.tools.jib.builder.steps.BuildAndCacheApplicationLayerStep.call(BuildAndCacheApplicationLayerStep.java:102)
	at com.google.cloud.tools.jib.builder.steps.BuildAndCacheApplicationLayerStep.call(BuildAndCacheApplicationLayerStep.java:38)
	... 6 more


To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

To Reproduce
Steps to reproduce the behavior:
1.
2.
3.

Configuration

quarkus.package.type=fast-jar

Screenshots
(If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

  • Output of uname -a or ver: Darwin xxx 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
  • Output of java -version:
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
  • GraalVM version (if different from Java):
  • Quarkus version or git rev: 1.6.0.Final
  • Build tool (ie. output of mvnw --version or gradlew --version):
Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-05T06:00:29+11:00)
Maven home: /Users/fmeunier/.m2/wrapper/dists/apache-maven-3.6.1-bin/38pn40mp89t5c94bjdbeod370m/apache-maven-3.6.1
Java version: 11.0.7, vendor: AdoptOpenJDK, runtime: /Users/fmeunier/.sdkman/candidates/java/11.0.7.hs-adpt
Default locale: en_AU, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.5", arch: "x86_64", family: "mac"

Additional context
(Add any other context about the problem here.)

@fredmtyro fredmtyro added the kind/bug Something isn't working label Jul 14, 2020
@quarkusbot
Copy link

/cc @geoand

@geoand
Copy link
Contributor

geoand commented Jul 14, 2020

Thanks for reporting.

This is a duplicate of #10586 and it has already been fixed in the master branch and will be part of 1.6.1.Final

@geoand geoand closed this as completed Jul 14, 2020
@geoand geoand added the triage/duplicate This issue or pull request already exists label Jul 14, 2020
@fredmtyro
Copy link
Author

Thanks, I should have also searched for closed issues!

@geoand
Copy link
Contributor

geoand commented Jul 14, 2020

No worries :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/container-image kind/bug Something isn't working triage/duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants