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

For synthetic injection points, target can be null #46107

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Feb 5, 2025

So we need to handle it properly.

Spotted in: https://github.com/quarkiverse/quarkus-artemis/actions/runs/13150585162/job/36697206471

With stacktrace:

Error: ]: Build step io.quarkus.arc.deployment.ConfigBuildStep#validateConfigMappingsInjectionPoints threw an exception: java.lang.NullPointerException: Cannot invoke "org.jboss.jandex.AnnotationTarget.kind()" because "target" is null
	at io.quarkus.arc.deployment.ConfigBuildStep.validateConfigMappingsInjectionPoints(ConfigBuildStep.java:413)
	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:255)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
	at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1627)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1594)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	at org.jboss.threads.JBossThread.run(JBossThread.java:499)

	at io.quarkus.builder.Execution.run(Execution.java:122)
	at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:78)
	at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:161)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:350)

So we need to handle it properly.

Spotted in: https://github.com/quarkiverse/quarkus-artemis/actions/runs/13150585162/job/36697206471

With stacktrace:
```
Error: ]: Build step io.quarkus.arc.deployment.ConfigBuildStep#validateConfigMappingsInjectionPoints threw an exception: java.lang.NullPointerException: Cannot invoke "org.jboss.jandex.AnnotationTarget.kind()" because "target" is null
	at io.quarkus.arc.deployment.ConfigBuildStep.validateConfigMappingsInjectionPoints(ConfigBuildStep.java:413)
	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:255)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
	at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1627)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1594)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	at org.jboss.threads.JBossThread.run(JBossThread.java:499)

	at io.quarkus.builder.Execution.run(Execution.java:122)
	at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:78)
	at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:161)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:350)
```
@gsmet gsmet requested review from Ladicek and manovotn February 5, 2025 17:01
@quarkus-bot quarkus-bot bot added the area/arc Issue related to ARC (dependency injection) label Feb 5, 2025
@gsmet
Copy link
Member Author

gsmet commented Feb 5, 2025

For the context: the error got triggered now because we migrated a ton of things to @ConfigMapping.

Copy link

quarkus-bot bot commented Feb 5, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 8c182c0.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

Copy link

github-actions bot commented Feb 5, 2025

🎊 PR Preview 17b634f has been successfully built and deployed to https://quarkus-pr-main-46107-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

@gsmet
Copy link
Member Author

gsmet commented Feb 5, 2025

I'm not sure if we need a test but you folks will probably figure out a lot faster than me what to test and where to add it :).

@manovotn
Copy link
Contributor

manovotn commented Feb 5, 2025

I'm not sure if we need a test but you folks will probably figure out a lot faster than me what to test and where to add it :).

Sure, I'll take a look tomorrow 👍

Copy link

quarkus-bot bot commented Feb 5, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 8c182c0.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

Copy link
Contributor

@manovotn manovotn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this needs a test and the possibility of getting null for synth. injection points is documented.

FTR, there is also InjectionPointInfo#isSynthetic to help determine these injection points.

@geoand geoand merged commit d03dcca into quarkusio:main Feb 6, 2025
54 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.19 - main milestone Feb 6, 2025
@gsmet gsmet modified the milestones: 3.19 - main, 3.18.3 Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants