java.lang.NoSuchMethodError: 'com.microsoft.aad.msal4j.SilentParameters$SilentParametersBuilder using azure sdk for java service bus

java.lang.NoSuchMethodError: 'com.microsoft.aad.msal4j.SilentParameters$SilentParametersBuilder using azure sdk for java service bus

我正在尝试使用托管标识将消息发送到我的 Azure 服务总线主题。 None 条消息已发送至主题。我在使用 connectionString 而不是 credential 时没有问题。

ServiceBusSenderClient

    String namespace = getNamespace();
    TokenCredential credential = new DefaultAzureCredentialBuilder()
        .build();

    ServiceBusSenderClient senderClient = new ServiceBusClientBuilder()
        .credential(namespace, credential)
        .sender()
        .topicName(topicName)
        .buildClient();
    senderClient.sendMessage(new ServiceBusMessage("TESTTEST"));
2022-02-28 10:52:11.671  INFO 14901 --- [   scheduling-1] c.azure.identity.EnvironmentCredential   : Azure Identity => EnvironmentCredential invoking ClientSecretCredential
2022-02-28 10:52:11.685  INFO 14901 --- [   scheduling-1] c.a.c.i.jackson.JacksonVersion           : Package versions: jackson-annotations=2.11.3, jackson-core=2.11.3, jackson-databind=2.11.3, jackson-dataformat-xml=2.11.3, jackson-datatype-jsr310=2.11.3, azure-core=1.23.1, Troubleshooting version conflicts: https://aka.ms/azsdk/java/dependency/troubleshoot
2022-02-28 10:52:11.749  INFO 14901 --- [   scheduling-1] c.a.m.s.i.ServiceBusConnectionProcessor  : namespace[https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/] entityPath[N/A]: Setting next AMQP channel.
2022-02-28 10:52:11.749  INFO 14901 --- [   scheduling-1] c.a.m.s.i.ServiceBusConnectionProcessor  : namespace[https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/] entityPath[N/A]: Next AMQP channel received, updating 0 current subscribers
2022-02-28 10:52:11.751  INFO 14901 --- [   scheduling-1] c.a.m.s.ServiceBusClientBuilder          : # of open clients with shared connection: 1
2022-02-28 10:52:11.770  INFO 14901 --- [   scheduling-1] c.a.c.a.i.ReactorConnection              : connectionId[MF_6e344f_1646041931731]: Creating and starting connection to https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/:5671
2022-02-28 10:52:11.783  INFO 14901 --- [   scheduling-1] c.a.c.a.implementation.ReactorExecutor   : connectionId[MF_6e344f_1646041931731] message[Starting reactor.]
2022-02-28 10:52:11.786  INFO 14901 --- [ctor-executor-1] c.a.c.a.i.handler.ConnectionHandler      : onConnectionInit connectionId[MF_6e344f_1646041931731] hostname[https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/] amqpHostname[https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/]
2022-02-28 10:52:11.786  INFO 14901 --- [ctor-executor-1] c.a.c.a.i.handler.ReactorHandler         : connectionId[MF_6e344f_1646041931731] reactor.onReactorInit
2022-02-28 10:52:11.786  INFO 14901 --- [ctor-executor-1] c.a.c.a.i.handler.ConnectionHandler      : onConnectionLocalOpen connectionId[MF_6e344f_1646041931731] hostname[https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/] errorCondition[null] errorDescription[null]
2022-02-28 10:52:11.828  INFO 14901 --- [ctor-executor-1] c.a.c.a.i.handler.ConnectionHandler      : onConnectionBound connectionId[MF_6e344f_1646041931731] hostname[https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/] peerDetails[https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/:5671]
2022-02-28 10:52:12.021  INFO 14901 --- [ctor-executor-1] c.a.c.a.i.handler.StrictTlsContextSpi    : SSLv2Hello was an enabled protocol. Filtering out.
2022-02-28 10:52:12.136  WARN 14901 --- [ctor-executor-1] c.a.c.a.i.handler.ConnectionHandler      : onTransportError hostname[https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/], connectionId[MF_6e344f_1646041931731], error[Connection reset by peer]
2022-02-28 10:52:12.139  INFO 14901 --- [ctor-executor-1] c.a.c.a.i.ReactorConnection              : connectionId[MF_6e344f_1646041931731] signal[Connection reset by peer, errorContext[NAMESPACE: https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/. ERROR CONTEXT: N/A], isTransient[false], initiatedByClient[false]]: Disposing of ReactorConnection.
2022-02-28 10:52:12.151  INFO 14901 --- [ctor-executor-1] c.a.c.a.i.handler.ConnectionHandler      : onConnectionUnbound hostname[https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/], connectionId[MF_6e344f_1646041931731], state[ACTIVE], remoteState[UNINITIALIZED]
2022-02-28 10:52:12.157  INFO 14901 --- [ctor-executor-1] c.a.c.a.i.ReactorConnection              : connectionId[MF_6e344f_1646041931731] Closing executor.
2022-02-28 10:52:12.159  INFO 14901 --- [ctor-executor-1] c.a.c.a.i.handler.ConnectionHandler      : onConnectionLocalClose connectionId[MF_6e344f_1646041931731] hostname[https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/] errorCondition[null] errorDescription[null]
2022-02-28 10:52:16.167  INFO 14901 --- [ctor-executor-1] c.a.c.a.implementation.ReactorExecutor   : connectionId[MF_6e344f_1646041931731] message[Processing all pending tasks and closing old reactor.]
2022-02-28 10:52:16.169  INFO 14901 --- [ctor-executor-1] c.a.c.a.i.ReactorDispatcher              : connectionId[MF_6e344f_1646041931731] Reactor selectable is being disposed.
2022-02-28 10:52:16.170  INFO 14901 --- [ctor-executor-1] c.a.c.a.i.ReactorConnection              : onConnectionShutdown connectionId[MF_6e344f_1646041931731], hostName[https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/], message[Shutting down], shutdown signal[false]
2022-02-28 10:52:16.187 ERROR 14901 --- [ctor-executor-1] reactor.core.publisher.Operators         : Operator called default onErrorDropped

reactor.core.Exceptions$ErrorCallbackNotImplemented: com.azure.core.amqp.exception.AmqpException: Connection reset by peer, errorContext[NAMESPACE: https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/. ERROR CONTEXT: N/A]
Caused by: com.azure.core.amqp.exception.AmqpException: Connection reset by peer, errorContext[NAMESPACE: https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/. ERROR CONTEXT: N/A]
    at com.azure.core.amqp.implementation.ExceptionUtil.toException(ExceptionUtil.java:85) ~[azure-core-amqp-2.3.7.jar:2.3.7]
    at com.azure.core.amqp.implementation.handler.ConnectionHandler.notifyErrorContext(ConnectionHandler.java:325) ~[azure-core-amqp-2.3.7.jar:2.3.7]
    at com.azure.core.amqp.implementation.handler.ConnectionHandler.onTransportError(ConnectionHandler.java:228) ~[azure-core-amqp-2.3.7.jar:2.3.7]
    at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:191) ~[proton-j-0.33.8.jar:na]
    at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108) ~[proton-j-0.33.8.jar:na]
    at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324) ~[proton-j-0.33.8.jar:na]
    at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:291) ~[proton-j-0.33.8.jar:na]
    at com.azure.core.amqp.implementation.ReactorExecutor.run(ReactorExecutor.java:92) ~[azure-core-amqp-2.3.7.jar:2.3.7]
    at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[reactor-core-3.4.1.jar:3.4.1]
    at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[reactor-core-3.4.1.jar:3.4.1]
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
    at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]

编辑: 将命名空间从 https://xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net/ 更改为 xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net 后,我更进一步了。

2022-02-28 16:08:14.362  INFO 18303 --- [   scheduling-1] c.a.c.i.jackson.JacksonVersion           : Package versions: jackson-annotations=2.11.3, jackson-core=2.11.3, jackson-databind=2.11.3, jackson-dataformat-xml=2.11.3, jackson-datatype-jsr310=2.11.3, azure-core=1.23.1, Troubleshooting version conflicts: https://aka.ms/azsdk/java/dependency/troubleshoot
2022-02-28 16:08:14.423  INFO 18303 --- [   scheduling-1] c.a.m.s.i.ServiceBusConnectionProcessor  : namespace[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net] entityPath[N/A]: Setting next AMQP channel.
2022-02-28 16:08:14.423  INFO 18303 --- [   scheduling-1] c.a.m.s.i.ServiceBusConnectionProcessor  : namespace[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net] entityPath[N/A]: Next AMQP channel received, updating 0 current subscribers
2022-02-28 16:08:14.424  INFO 18303 --- [   scheduling-1] c.a.m.s.ServiceBusClientBuilder          : # of open clients with shared connection: 1
2022-02-28 16:08:14.442  INFO 18303 --- [   scheduling-1] c.a.c.a.i.ReactorConnection              : connectionId[MF_2bb2ea_1646060894406]: Creating and starting connection to xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net:5671
2022-02-28 16:08:14.454  INFO 18303 --- [   scheduling-1] c.a.c.a.implementation.ReactorExecutor   : connectionId[MF_2bb2ea_1646060894406] message[Starting reactor.]
2022-02-28 16:08:14.456  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.handler.ConnectionHandler      : onConnectionInit connectionId[MF_2bb2ea_1646060894406] hostname[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net] amqpHostname[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net]
2022-02-28 16:08:14.456  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.handler.ReactorHandler         : connectionId[MF_2bb2ea_1646060894406] reactor.onReactorInit
2022-02-28 16:08:14.456  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.handler.ConnectionHandler      : onConnectionLocalOpen connectionId[MF_2bb2ea_1646060894406] hostname[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net] errorCondition[null] errorDescription[null]
2022-02-28 16:08:14.496  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.handler.ConnectionHandler      : onConnectionBound connectionId[MF_2bb2ea_1646060894406] hostname[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net] peerDetails[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net:5671]
2022-02-28 16:08:14.656  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.handler.StrictTlsContextSpi    : SSLv2Hello was an enabled protocol. Filtering out.
2022-02-28 16:08:14.979  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.handler.ConnectionHandler      : onConnectionRemoteOpen hostname[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net], connectionId[MF_2bb2ea_1646060894406], remoteContainer[4faee4fd82174e4e8afdc32b31b04f28_G10]
2022-02-28 16:08:14.980  INFO 18303 --- [ctor-executor-1] c.a.m.s.i.ServiceBusConnectionProcessor  : namespace[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net] entityPath[N/A]: Channel is now active.
2022-02-28 16:08:15.056  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.handler.SessionHandler         : onSessionRemoteOpen connectionId[MF_2bb2ea_1646060894406], entityName[mdm-asset-topic], sessionIncCapacity[0], sessionOutgoingWindow[2147483647]
2022-02-28 16:08:15.071  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.ReactorConnection              : Setting CBS channel.
2022-02-28 16:08:15.127  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.handler.SessionHandler         : onSessionRemoteOpen connectionId[MF_2bb2ea_1646060894406], entityName[cbs-session], sessionIncCapacity[0], sessionOutgoingWindow[2147483647]
2022-02-28 16:08:15.136  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.ReactorConnection              : connectionId[MF_2bb2ea_1646060894406] entityPath[$cbs] linkName[cbs] Emitting new response channel.
2022-02-28 16:08:15.137  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.RequestResponseChannel:$cbs    : namespace[MF_2bb2ea_1646060894406] entityPath[$cbs]: Setting next AMQP channel.
2022-02-28 16:08:15.137  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.RequestResponseChannel:$cbs    : namespace[MF_2bb2ea_1646060894406] entityPath[$cbs]: Next AMQP channel received, updating 1 current subscribers
2022-02-28 16:08:15.196 ERROR 18303 --- [ctor-executor-1] reactor.core.scheduler.Schedulers        : Scheduler worker in group main failed with an uncaught exception

java.lang.NoSuchMethodError: 'com.microsoft.aad.msal4j.SilentParameters$SilentParametersBuilder com.microsoft.aad.msal4j.SilentParameters$SilentParametersBuilder.tenant(java.lang.String)'
at com.azure.identity.implementation.IdentityClient.lambda$authenticateWithConfidentialClientCache(IdentityClient.java:771) ~[azure-identity-1.4.4.jar:1.4.4]
at reactor.core.publisher.Mono.lambda$fromFuture(Mono.java:649) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:44) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1784) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoCacheTime$CoordinatorSubscriber.signalCached(MonoCacheTime.java:328) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoCacheTime$CoordinatorSubscriber.onNext(MonoCacheTime.java:345) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2346) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoCacheTime$CoordinatorSubscriber.onSubscribe(MonoCacheTime.java:284) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:54) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoCacheTime.subscribeOrReturn(MonoCacheTime.java:134) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.Mono.subscribe(Mono.java:4031) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:425) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:270) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:228) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:370) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:164) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:86) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1784) ~[reactor-core-3.4.1.jar:3.4.1]
at com.azure.core.amqp.implementation.AmqpChannelProcessor$ChannelSubscriber.onNext(AmqpChannelProcessor.java:389) ~[azure-core-amqp-2.3.7.jar:2.3.7]
at com.azure.core.amqp.implementation.AmqpChannelProcessor.lambda$onNext[=12=](AmqpChannelProcessor.java:96) ~[azure-core-amqp-2.3.7.jar:2.3.7]
at java.base/java.util.concurrent.ConcurrentLinkedDeque.forEach(ConcurrentLinkedDeque.java:1650) ~[na:na]
at com.azure.core.amqp.implementation.AmqpChannelProcessor.onNext(AmqpChannelProcessor.java:96) ~[azure-core-amqp-2.3.7.jar:2.3.7]
at reactor.core.publisher.FluxRepeatPredicate$RepeatPredicateSubscriber.onNext(FluxRepeatPredicate.java:85) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:210) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:127) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:127) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1784) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:249) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1784) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:148) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.ignoreDone(MonoIgnoreThen.java:191) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreInner.onComplete(MonoIgnoreThen.java:248) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.SerializedSubscriber.onComplete(SerializedSubscriber.java:146) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.SerializedSubscriber.onComplete(SerializedSubscriber.java:146) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.onComplete(FluxTimeout.java:233) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoNext$NextSubscriber.onComplete(MonoNext.java:102) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:83) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxFilterFuseable$FilterFuseableSubscriber.onNext(FluxFilterFuseable.java:118) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxReplay$SizeBoundReplayBuffer.replayNormal(FluxReplay.java:814) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxReplay$SizeBoundReplayBuffer.replay(FluxReplay.java:898) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxReplay$ReplaySubscriber.onNext(FluxReplay.java:1246) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:199) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:199) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:120) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxDistinctUntilChanged$DistinctUntilChangedSubscriber.tryOnNext(FluxDistinctUntilChanged.java:148) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxDistinctUntilChanged$DistinctUntilChangedSubscriber.onNext(FluxDistinctUntilChanged.java:101) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxReplay$SizeBoundReplayBuffer.replayNormal(FluxReplay.java:814) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.FluxReplay$SizeBoundReplayBuffer.replay(FluxReplay.java:898) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.ReplayProcessor.tryEmitNext(ReplayProcessor.java:508) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.SinkManySerialized.tryEmitNext(SinkManySerialized.java:97) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.publisher.InternalManySink.emitNext(InternalManySink.java:27) ~[reactor-core-3.4.1.jar:3.4.1]
at com.azure.core.amqp.implementation.handler.Handler.onNext(Handler.java:87) ~[azure-core-amqp-2.3.7.jar:2.3.7]
at com.azure.core.amqp.implementation.handler.SessionHandler.onSessionRemoteOpen(SessionHandler.java:84) ~[azure-core-amqp-2.3.7.jar:2.3.7]
at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:146) ~[proton-j-0.33.8.jar:na]
at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108) ~[proton-j-0.33.8.jar:na]
at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324) ~[proton-j-0.33.8.jar:na]
at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:291) ~[proton-j-0.33.8.jar:na]
at com.azure.core.amqp.implementation.ReactorExecutor.run(ReactorExecutor.java:92) ~[azure-core-amqp-2.3.7.jar:2.3.7]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[reactor-core-3.4.1.jar:3.4.1]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[reactor-core-3.4.1.jar:3.4.1]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]

2022-02-28 16:08:19.199  INFO 18303 --- [ctor-executor-1] c.a.c.a.implementation.ReactorExecutor   : connectionId[MF_2bb2ea_1646060894406] message[Processing all pending tasks and closing old reactor.]
2022-02-28 16:08:19.200  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.handler.SessionHandler         : onSessionRemoteOpen connectionId[MF_2bb2ea_1646060894406], entityName[cbs-session], sessionIncCapacity[0], sessionOutgoingWindow[2147483647]
2022-02-28 16:08:19.201  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.ReactorDispatcher              : connectionId[MF_2bb2ea_1646060894406] Reactor selectable is being disposed.
2022-02-28 16:08:19.201  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.ReactorConnection              : onConnectionShutdown connectionId[MF_2bb2ea_1646060894406], hostName[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net], message[Shutting down], shutdown signal[false]
2022-02-28 16:08:19.201  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.ReactorConnection              : connectionId[MF_2bb2ea_1646060894406] signal[connectionId[MF_2bb2ea_1646060894406] Reactor selectable is disposed., isTransient[false], initiatedByClient[false]]: Disposing of ReactorConnection.
2022-02-28 16:08:19.201  INFO 18303 --- [ctor-executor-1] c.a.m.s.i.ServiceBusConnectionProcessor  : namespace[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net] entityPath[N/A]: Channel is closed. Requesting upstream.
2022-02-28 16:08:19.202  INFO 18303 --- [ctor-executor-1] c.a.m.s.i.ServiceBusConnectionProcessor  : namespace[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net] entityPath[N/A]: Connection not requested, yet. Requesting one.
2022-02-28 16:08:19.202  INFO 18303 --- [ctor-executor-1] c.a.m.s.i.ServiceBusConnectionProcessor  : namespace[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net] entityPath[N/A]: Setting next AMQP channel.
2022-02-28 16:08:19.202  INFO 18303 --- [ctor-executor-1] c.a.m.s.i.ServiceBusConnectionProcessor  : namespace[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net] entityPath[N/A]: Next AMQP channel received, updating 0 current subscribers
2022-02-28 16:08:19.225  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.ReactorConnection              : onConnectionShutdown connectionId[MF_2bb2ea_1646060894406], hostName[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net], message[Shutting down], shutdown signal[true]
2022-02-28 16:08:19.227  INFO 18303 --- [ctor-executor-1] c.a.c.a.i.ReactorConnection              : onConnectionShutdown connectionId[MF_2bb2ea_1646060894406], hostName[xxxx-xxxx-xxx-xxx-xx.servicebus.windows.net], message[Shutting down], shutdown signal[false]
2022-02-28 16:09:19.224  INFO 18303 --- [     parallel-1] c.a.c.a.i.RequestResponseChannel         : connectionId[MF_2bb2ea_1646060894406] linkName[cbs] Timed out waiting for RequestResponseChannel to complete closing. Manually closing.
2022-02-28 16:09:19.227  WARN 18303 --- [     parallel-1] c.a.c.a.i.ReactorDispatcher              : ReactorDispatcher instance is closed. Should not continue dispatching work to this reactor.
2022-02-28 16:09:19.227  INFO 18303 --- [     parallel-1] c.a.c.a.i.ReactorConnection              : connectionId[MF_2bb2ea_1646060894406] Could not schedule closeConnection work. Manually disposing.
2022-02-28 16:09:19.229  INFO 18303 --- [     parallel-1] c.a.c.a.i.ReactorConnection              : connectionId[MF_2bb2ea_1646060894406] Closing executor.

已解决 通过将 azure-identity 包从 1.4.4 更改为 1.3.7

解决了这个问题

请检查以下步骤是否有助于解决问题 -

  • java.lang.NoSuchMethodError主要是依赖的版本冲突
  • 项目中可能有少数方法或库不兼容或缺失。
  • 要解决此问题,请尝试升级甚至降级依赖版本。
  • 在某些情况下,删除不必要的依赖项也有效。
  • 请查看官方java doc of SilentParameterclass及其相关方法
  • 一般来说,NoSuchMethodError 如果 class A 期望 class B 中的方法已编译但在 运行 时间另一个 class es没有那个方法。这里的方法可以是第三方jar库,也可以是classes.
  • 中的普通方法
  • 有时可能是,您已经针对某个库的某个版本编译了代码,该版本也可以是 JDK 本身,但是您的 运行time 有其他 versions 和可能是您添加了方法的其中一个模块的情况,忘记了编译,所以在运行时它使用的是旧版本。