quarkusio/quarkus · error · IllegalStateException
No current injection point found
Error message
No current injection point found
What it means
Thrown by ConfigMappingCreator.create when InjectionPointProvider.getCurrent(context) returns null while producing a synthetic bean that backs a @ConfigMapping interface. The creator needs the declaring injection point to determine which mapping interface to instantiate; outside a proper bean-creation context (e.g., programmatic lookup with no injection point metadata available), no current InjectionPoint exists and the guard rejects creation.
Source
Thrown at extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigMappingCreator.java:18
package io.quarkus.arc.runtime;
import jakarta.enterprise.inject.spi.Annotated;
import jakarta.enterprise.inject.spi.InjectionPoint;
import org.eclipse.microprofile.config.ConfigProvider;
import io.quarkus.arc.BeanCreator;
import io.quarkus.arc.SyntheticCreationalContext;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.SmallRyeConfig;
public class ConfigMappingCreator implements BeanCreator<Object> {
@Override
public Object create(SyntheticCreationalContext<Object> context) {
InjectionPoint injectionPoint = context.getInjectedReference(InjectionPoint.class);
if (injectionPoint == null) {
throw new IllegalStateException("No current injection point found");
}
Class<?> interfaceType = (Class<?>) context.getParams().get("type");
String prefix = (String) context.getParams().get("prefix");
SmallRyeConfig config = (SmallRyeConfig) ConfigProvider.getConfig();
return config.getConfigMapping(interfaceType, getPrefixFromInjectionPoint(injectionPoint, prefix));
}
private static String getPrefixFromInjectionPoint(final InjectionPoint injectionPoint, final String prefix) {
Annotated annotated = injectionPoint.getAnnotated();
if (annotated != null) {
ConfigMapping configMapping = annotated.getAnnotation(ConfigMapping.class);
if (configMapping != null) {
if (!configMapping.prefix().isEmpty()) {
return configMapping.prefix();
}
}View on GitHub (pinned to e1c734241f)
Solutions
- Inject the @ConfigMapping interface into a bean instead of obtaining it via Instance.select() with no metadata / programmatic context
- Make sure the config mapping interface is registered (annotated @ConfigMapping and discovered) so the synthetic bean resolves normally
- Avoid resolving the mapping from a non-CDI thread or outside the container lifecycle
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigMappingCreator.java:18 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/7691a5a85169a7da.
Report an issue: GitHub.