admin管理员组

文章数量:1287116

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?

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?

Share Improve this question asked Feb 24 at 22:45 soheil_ptrsoheil_ptr 1015 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

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

本文标签: quarkusFacing an issue with mapping configurationStack Overflow