Skip to content

Facing an issue with mapping configuration #46469

@soheil1987

Description

@soheil1987

In building my quarkus application I am facing the following exceptions.

Caused by: java.util.NoSuchElementException: SRCFG00028: Could not find a mapping for io.quarkus.deployment.dev.testing.TestConfig with prefix at io.smallrye.config.SmallRyeConfig.getConfigMapping(SmallRyeConfig.java:636) at io.smallrye.config.SmallRyeConfig.getConfigMapping(SmallRyeConfig.java:621) at io.quarkus.test.junit.AbstractJvmQuarkusTestExtension.evaluateExecutionCondition(AbstractJvmQuarkusTestExtension.java:287)

I have defined two Converters as following

@Priority(100) public class TestConfigProfileConverter implements Converter<TestConfig.Container> {

@Inject
@ConfigMapping(prefix = "quarkus.test")
ConfigMapInterface configMapInterface;

@Override
public TestConfig.Container convert(String s) throws IllegalArgumentException, NullPointerException {
    return new TestConfig.Container();
}
}

and

@Priority(100) public class TestConfigContainerConverter implements Converter<TestConfig.Profile> { @Inject @ConfigMapping(prefix = "quarkus.test") ConfigMapInterface configMapInterface;

@Override
public TestConfig.Profile convert(String s) throws IllegalArgumentException, NullPointerException {
    return new TestConfig.Profile();
}
}

I also have my application.properties defined in resources directory with all required quarkus.test configuration fields. What am i missing here?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions