soheil_ptr
soheil_ptr

Reputation: 101

Facing an issue with mapping configuration

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?

Upvotes: 0

Views: 28

Answers (1)

Roberto Cortez
Roberto Cortez

Reputation: 1163

Since you also opened an issue in the Quarkus GitHub repository, I'm following up there: https://github.com/quarkusio/quarkus/issues/46469

Upvotes: 0

Related Questions