quarkusio/quarkus · error · IllegalStateException

No current injection point found

Error message

No current injection point found

What it means

Thrown by ConfigPropertiesCreator.create when InjectionPointProvider.getCurrent(context) returns null while creating the synthetic bean for a legacy @ConfigProperties class. The creator reads the injection point to know which properties prefix and class to materialize; when resolution happens outside a bean-creation flow that carries injection point metadata (e.g., bare programmatic lookup), the sentinel guard rejects it because there is no way to infer the target configuration class.

Source

Thrown at extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigPropertiesCreator.java:20

import java.lang.annotation.Annotation;

import jakarta.enterprise.inject.spi.Annotated;
import jakarta.enterprise.inject.spi.InjectionPoint;

import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.config.inject.ConfigProperties;

import io.quarkus.arc.BeanCreator;
import io.quarkus.arc.SyntheticCreationalContext;
import io.smallrye.config.SmallRyeConfig;

public class ConfigPropertiesCreator 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) {
            ConfigProperties configProperties = annotated.getAnnotation(ConfigProperties.class);
            if (configProperties != null) {
                if (!ConfigProperties.UNCONFIGURED_PREFIX.equals(configProperties.prefix())) {
                    return configProperties.prefix();
                }
            }

View on GitHub (pinned to e1c734241f)

Solutions

  1. Inject the @ConfigProperties class via normal CDI injection rather than resolving it programmatically without metadata
  2. Migrate from the deprecated @ConfigProperties to a @ConfigMapping interface, which does not depend on an injection point
  3. Ensure the lookup goes through the container (CDI.current().select(...)) within an active bean-creation context
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigPropertiesCreator.java:20 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/0396535bf50292de. Report an issue: GitHub.