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

Can't perform augmentation when using gRpc extension #43472

Closed
RacmanT opened this issue Sep 24, 2024 · 2 comments · Fixed by #43515 or #43516
Closed

Can't perform augmentation when using gRpc extension #43472

RacmanT opened this issue Sep 24, 2024 · 2 comments · Fixed by #43515 or #43516
Assignees
Labels
area/grpc gRPC kind/bug Something isn't working
Milestone

Comments

@RacmanT
Copy link

RacmanT commented Sep 24, 2024

Describe the bug

Hi all! 👋
I have an application using the quarkus-grpc extension and since the 3.14.3 Quarkus version the augmentation stopped working (see steps below)

Expected behavior

2024-09-24 17:55:57,357 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 1470ms

Actual behavior

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doReaugment(QuarkusEntryPoint.java:90)
	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:49)
	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:33)
Caused by: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.deployment.pkg.steps.JarResultBuildStep#buildRunnerJar threw an exception: java.util.NoSuchElementException
	at java.base/java.util.ArrayList$Itr.next(ArrayList.java:1052)
	at java.base/java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1078)
	at io.quarkus.sbom.ApplicationManifestConfig$Builder.setApplicationModel(ApplicationManifestConfig.java:46)
	at io.quarkus.deployment.pkg.steps.JarResultBuildStep.buildThinJar(JarResultBuildStep.java:598)
	at io.quarkus.deployment.pkg.steps.JarResultBuildStep.buildRunnerJar(JarResultBuildStep.java:228)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	at org.jboss.threads.JBossThread.run(JBossThread.java:483)

	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:354)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createProductionApplication(AugmentActionImpl.java:178)
	at io.quarkus.deployment.mutability.ReaugmentTask.main(ReaugmentTask.java:70)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	... 4 more
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.deployment.pkg.steps.JarResultBuildStep#buildRunnerJar threw an exception: java.util.NoSuchElementException
	at java.base/java.util.ArrayList$Itr.next(ArrayList.java:1052)
	at java.base/java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1078)
	at io.quarkus.sbom.ApplicationManifestConfig$Builder.setApplicationModel(ApplicationManifestConfig.java:46)
	at io.quarkus.deployment.pkg.steps.JarResultBuildStep.buildThinJar(JarResultBuildStep.java:598)
	at io.quarkus.deployment.pkg.steps.JarResultBuildStep.buildRunnerJar(JarResultBuildStep.java:228)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	at org.jboss.threads.JBossThread.run(JBossThread.java:483)

	at io.quarkus.builder.Execution.run(Execution.java:123)
	at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
	at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:161)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:350)
	... 7 more
Caused by: java.util.NoSuchElementException
	at java.base/java.util.ArrayList$Itr.next(ArrayList.java:1052)
	at java.base/java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1078)
	at io.quarkus.sbom.ApplicationManifestConfig$Builder.setApplicationModel(ApplicationManifestConfig.java:46)
	at io.quarkus.deployment.pkg.steps.JarResultBuildStep.buildThinJar(JarResultBuildStep.java:598)
	at io.quarkus.deployment.pkg.steps.JarResultBuildStep.buildRunnerJar(JarResultBuildStep.java:228)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	at org.jboss.threads.JBossThread.run(JBossThread.java:483)

How to Reproduce?

  1. clone the repo grpc-plain-text-quickstart and cd .../quarkus-quickstarts/grpc-plain-text-quickstart
  2. change Quarkus version in the pom.xml to <quarkus.platform.version>3.14.3</quarkus.platform.version>
  3. build the app as a mutable-jar with (skipping the tests otherwise it won't build)
./mvnw clean install -Dquarkus.package.jar.type=mutable-jar -DskipTests
  1. perform the augmentation with
java -jar -Dquarkus.launch.rebuild=true target/quarkus-app/quarkus-run.jar

Output of uname -a or ver

No response

Output of java -version

21

Quarkus version or git rev

>= 3.14.3

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

Works as expected with the version 3.14.2. Bug persists in the 3.15.0.CR1

@RacmanT RacmanT added the kind/bug Something isn't working label Sep 24, 2024
@quarkus-bot quarkus-bot bot added the area/grpc gRPC label Sep 24, 2024
Copy link

quarkus-bot bot commented Sep 24, 2024

/cc @alesj (grpc), @cescoffier (grpc)

@cescoffier
Copy link
Member

Sounds like a SBOM issue actually. @aloubyansky, WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment