Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smallrye error reporting bug: ...SmallRyeConfigFactory: ...QuarkusConfigFactory not a subtype #19137

Closed
ge0ffrey opened this issue Jul 30, 2021 · 7 comments
Labels

Comments

@ge0ffrey
Copy link
Contributor

Describe the bug

When an error occurs in smallrye, the error handling itself throws an error.

Expected behavior

Only the original error stacktrace is shown, it doesn't cause an error in the error handling.

Actual behavior

This extra error fills the log (after the original error's stacktrace):

2021-07-30 15:48:25,681 ERROR [io.sma.rea.mes.amqp] (ForkJoinPool.commonPool-worker-3) SRMSG16225: Failure reported for channel `solver_response`, closing client: java.util.ServiceConfigurationError: io.smallrye.config.SmallRyeConfigFactory: io.quarkus.runtime.configuration.QuarkusConfigFactory not a subtype
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:588)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1236)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
	at io.smallrye.config.SmallRyeConfigProviderResolver.getFactoryFor(SmallRyeConfigProviderResolver.java:100)
	at io.smallrye.config.SmallRyeConfigProviderResolver.getConfig(SmallRyeConfigProviderResolver.java:76)
	at io.smallrye.config.SmallRyeConfigProviderResolver.getConfig(SmallRyeConfigProviderResolver.java:64)
	at org.eclipse.microprofile.config.ConfigProvider.getConfig(ConfigProvider.java:85)
	at io.smallrye.reactive.messaging.amqp.AmqpConnectorCommonConfiguration.getFromAlias(AmqpConnectorCommonConfiguration.java:36)
	at io.smallrye.reactive.messaging.amqp.AmqpConnectorCommonConfiguration.getFromAliasWithDefaultValue(AmqpConnectorCommonConfiguration.java:48)
	at io.smallrye.reactive.messaging.amqp.AmqpConnectorCommonConfiguration.lambda$getReconnectAttempts$3(AmqpConnectorCommonConfiguration.java:159)
	at java.base/java.util.Optional.orElseGet(Optional.java:369)
	at io.smallrye.reactive.messaging.amqp.AmqpConnectorCommonConfiguration.getReconnectAttempts(AmqpConnectorCommonConfiguration.java:159)
	at io.smallrye.reactive.messaging.amqp.AmqpCreditBasedSender.send(AmqpCreditBasedSender.java:215)
	at io.smallrye.reactive.messaging.amqp.AmqpCreditBasedSender.lambda$onNext$3(AmqpCreditBasedSender.java:131)
	at io.smallrye.context.impl.wrappers.SlowContextualFunction.apply(SlowContextualFunction.java:21)
	at io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni$UniOnItemTransformToUniProcessor.performInnerSubscription(UniOnItemTransformToUni.java:68)
	at io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni$UniOnItemTransformToUniProcessor.onItem(UniOnItemTransformToUni.java:57)
	at io.smallrye.mutiny.operators.uni.UniOnCancellation$UniOnCancellationProcessor.onItem(UniOnCancellation.java:43)
	at io.smallrye.mutiny.operators.uni.UniOnItemConsume$UniOnItemComsumeProcessor.onItem(UniOnItemConsume.java:43)
	at io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni$UniOnItemTransformToUniProcessor.onItem(UniOnItemTransformToUni.java:60)
	at io.smallrye.mutiny.operators.uni.builders.UniCreateFromKnownItem$KnownItemSubscription.forward(UniCreateFromKnownItem.java:38)
	at io.smallrye.mutiny.operators.uni.builders.UniCreateFromKnownItem$KnownItemSubscription.access$100(UniCreateFromKnownItem.java:26)
	at io.smallrye.mutiny.operators.uni.builders.UniCreateFromKnownItem.subscribe(UniCreateFromKnownItem.java:23)
	at io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:36)
	at io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni$UniOnItemTransformToUniProcessor.performInnerSubscription(UniOnItemTransformToUni.java:81)
	at io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni$UniOnItemTransformToUniProcessor.onItem(UniOnItemTransformToUni.java:57)
	at io.smallrye.mutiny.operators.uni.builders.UniCreateFromKnownItem$KnownItemSubscription.forward(UniCreateFromKnownItem.java:38)
	at io.smallrye.mutiny.operators.uni.builders.UniCreateFromKnownItem$KnownItemSubscription.access$100(UniCreateFromKnownItem.java:26)
	at io.smallrye.mutiny.operators.uni.builders.UniCreateFromKnownItem.subscribe(UniCreateFromKnownItem.java:23)
	at io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:36)
	at io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni.subscribe(UniOnItemTransformToUni.java:25)
	at io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:36)
	at io.smallrye.mutiny.operators.uni.UniOnItemConsume.subscribe(UniOnItemConsume.java:30)
	at io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:36)
	at io.smallrye.mutiny.operators.uni.UniOnCancellation.subscribe(UniOnCancellation.java:23)
	at io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:36)
	at io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni.subscribe(UniOnItemTransformToUni.java:25)
	at io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:36)
	at io.smallrye.mutiny.groups.UniSubscribe.withSubscriber(UniSubscribe.java:50)
	at io.smallrye.mutiny.groups.UniSubscribe.with(UniSubscribe.java:90)
	at io.smallrye.reactive.messaging.amqp.AmqpCreditBasedSender.onNext(AmqpCreditBasedSender.java:140)
	at io.smallrye.reactive.messaging.amqp.AmqpCreditBasedSender.onNext(AmqpCreditBasedSender.java:33)
	at io.smallrye.mutiny.subscription.SafeSubscriber.onNext(SafeSubscriber.java:98)
	at io.smallrye.mutiny.helpers.HalfSerializer.onNext(HalfSerializer.java:31)
	at io.smallrye.mutiny.helpers.StrictMultiSubscriber.onItem(StrictMultiSubscriber.java:83)
	at io.smallrye.mutiny.subscription.MultiSubscriber.onNext(MultiSubscriber.java:61)
	at io.smallrye.mutiny.streams.utils.ConnectableProcessor.onNext(ConnectableProcessor.java:122)
	at org.eclipse.microprofile.reactive.streams.operators.CompletionSubscriber$1DefaultCompletionSubscriber.onNext(CompletionSubscriber.java:85)
	at org.eclipse.microprofile.reactive.streams.operators.CompletionSubscriber$1DefaultCompletionSubscriber.onNext(CompletionSubscriber.java:85)
	at io.smallrye.mutiny.subscription.SafeSubscriber.onNext(SafeSubscriber.java:98)
	at io.smallrye.mutiny.subscription.SafeSubscriber.onNext(SafeSubscriber.java:98)
	at io.smallrye.mutiny.helpers.HalfSerializer.onNext(HalfSerializer.java:31)
	at io.smallrye.mutiny.helpers.StrictMultiSubscriber.onItem(StrictMultiSubscriber.java:83)
	at io.smallrye.mutiny.operators.multi.MultiOperatorProcessor.onItem(MultiOperatorProcessor.java:67)
	at io.smallrye.mutiny.operators.multi.builders.BufferItemMultiEmitter.drain(BufferItemMultiEmitter.java:118)
	at io.smallrye.mutiny.operators.multi.builders.BufferItemMultiEmitter.emit(BufferItemMultiEmitter.java:34)
	at io.smallrye.mutiny.operators.multi.builders.SerializedMultiEmitter.onItem(SerializedMultiEmitter.java:49)
	at io.smallrye.mutiny.operators.multi.builders.SerializedMultiEmitter.emit(SerializedMultiEmitter.java:139)
	at io.smallrye.reactive.messaging.extension.ThrowingEmitter.emit(ThrowingEmitter.java:63)
	at io.smallrye.reactive.messaging.extension.AbstractEmitter.emit(AbstractEmitter.java:146)
	at io.smallrye.reactive.messaging.extension.EmitterImpl.send(EmitterImpl.java:29)
	at org.acme.schooltimetabling.messaging.TimeTableMessagingHandler.reply(TimeTableMessagingHandler.java:106)
	at org.acme.schooltimetabling.messaging.TimeTableMessagingHandler.replyFailure(TimeTableMessagingHandler.java:97)
	at org.acme.schooltimetabling.messaging.TimeTableMessagingHandler.lambda$solve$0(TimeTableMessagingHandler.java:83)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1728)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)

How to Reproduce?

git clone https://github.com/kiegroup/optaplanner-quickstarts.git
cd optaplanner-quickstarts
git checkout development
cd technology/java-activemq-quarkus
gedit pom.xml // Switch it to 2.1.0.Final
mvn clean install -DskipTests
cd solver
mvn test -Dtest=TimeTableMessagingHandlerTest#solve
Scroll past the first stacktrace (drools related) to the second one.

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@ge0ffrey ge0ffrey added the kind/bug Something isn't working label Jul 30, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 30, 2021

@ge0ffrey
Copy link
Contributor Author

Related to #19136

@geoand
Copy link
Contributor

geoand commented Aug 3, 2021

With #19136 fixed, is this still an issue?

@rsynek
Copy link
Contributor

rsynek commented Aug 3, 2021

@geoand I think this report focuses on how the Smallrye communicates the root cause (#19136). The extra error log illustrated in the "Actual behavior" section detracts attention from the root cause. In other words, yes, it is still an issue.

@ge0ffrey
Copy link
Contributor Author

ge0ffrey commented Aug 3, 2021

With #19136 fixed, is this still an issue?

Probably (as Radovan said), but note that it will only reproduce if there's another issue, because it's an issue in the error reporting. You can use the reproducer in the description to reproduce by using quarkus 2.1.0.Final, but not 2.1.1.Final once that's out.

@robvanderboom
Copy link

i get this error still today with latest quarkus 3.0.0..
i have project with childmodules and only by adding smallrye in the pom.xml (en the microprofile), without even coding, this error occurs.. No idea how to solve it... We wanted to use it to sent metrics to prometheus, but now have to find different way.

The error we get not with mvn clean install, but when we do quarkus build OR build via kc.sh build (latest keycloak with quarkus 3 )..

No other issues that with smallrye.

@geoand
Copy link
Contributor

geoand commented May 26, 2023

@robvanderboom any chance you can attach a sample project?

@radcortez radcortez closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants