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

[BUG] Send message to Service bus queue giving error: Code is available in official Document but still not working #43878

Closed
3 tasks done
PraveenCarlsberg opened this issue Jan 22, 2025 · 3 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus

Comments

@PraveenCarlsberg
Copy link

Describe the bug

Exception or Stack Trace
17:49:22.171 [main] WARN reactor.core.Exceptions -- throwIfFatal detected a jvm fatal exception, which is thrown and logged below:
java.lang.NoSuchMethodError: 'void com.azure.core.amqp.implementation.ReactorConnection.(java.lang.String, com.azure.core.amqp.implementation.ConnectionOptions, com.azure.core.amqp.implementation.ReactorProvider, com.azure.core.amqp.implementation.ReactorHandlerProvider, com.azure.core.amqp.implementation.TokenManagerProvider, com.azure.core.amqp.implementation.MessageSerializer, org.apache.qpid.proton.amqp.transport.SenderSettleMode, org.apache.qpid.proton.amqp.transport.ReceiverSettleMode)'
at com.azure.messaging.servicebus.implementation.ServiceBusReactorAmqpConnection.(ServiceBusReactorAmqpConnection.java:74)
at com.azure.messaging.servicebus.ServiceBusClientBuilder.lambda$getOrCreateConnectionProcessor$0(ServiceBusClientBuilder.java:710)
at reactor.core.publisher.MonoCallable$MonoCallableSubscription.request(MonoCallable.java:137)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2367)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2241)
at reactor.core.publisher.MonoCallable.subscribe(MonoCallable.java:48)
at reactor.core.publisher.FluxRepeatPredicate$RepeatPredicateSubscriber.resubscribe(FluxRepeatPredicate.java:120)
at reactor.core.publisher.MonoRepeatPredicate.subscribeOrReturn(MonoRepeatPredicate.java:48)
at reactor.core.publisher.Flux.subscribe(Flux.java:8833)
at reactor.core.publisher.Flux.subscribeWith(Flux.java:8969)
at com.azure.messaging.servicebus.ServiceBusClientBuilder.getOrCreateConnectionProcessor(ServiceBusClientBuilder.java:715)
at com.azure.messaging.servicebus.ServiceBusClientBuilder.access$700(ServiceBusClientBuilder.java:186)
at com.azure.messaging.servicebus.ServiceBusClientBuilder$ServiceBusSenderClientBuilder.buildAsyncClient(ServiceBusClientBuilder.java:907)
at com.azure.messaging.servicebus.ServiceBusClientBuilder$ServiceBusSenderClientBuilder.buildClient(ServiceBusClientBuilder.java:954)

To Reproduce
Steps to reproduce the behavior:

Code Snippet
final String conn = "myconnectionstring";
final String qu = "comm-event";
@test
public void sendMess(){
String userEvent = "Data test";
Logger.logInfo(String.format("User profile update event : %s", userEvent));
ServiceBusSenderClient senderClient = new ServiceBusClientBuilder()
.connectionString(conn)

            .sender()
            .queueName(qu)
            .buildClient();
     senderClient.sendMessage(new ServiceBusMessage(userEvent));
     senderClient.close();
    System.out.println("Sent a single message to the queue: " + qu);

    CompletableFuture<Void> task = CompletableFuture.runAsync(() -> {
       // senderClient.sendMessage(new ServiceBusMessage(userEvent));
       // senderClient.close();
    });
    try {
        task.get(); // Wait for the task to complete
    } catch (Exception e) {
        e.printStackTrace();
    }
}

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: [e.g. iOS]
  • IDE: [e.g. IntelliJ]
  • Library/Libraries: [e.g. com.azure:azure-core:1.16.0 (groupId:artifactId:version)]
  • Java version: [e.g. 8]
  • App Server/Environment: [e.g. Tomcat, WildFly, Azure Function, Apache Spark, Databricks, IDE plugin or anything special]
  • Frameworks: [e.g. Spring Boot, Micronaut, Quarkus, etc]

If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError, NoSuchMethodError or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:

  • verbose dependency tree (mvn dependency:tree -Dverbose)
  • exception message, full stack trace, and any available logs

Additional context
Somewhere I have seen solution around that to add in .transportType(AmqpTransportType.AMQP_WEB_SOCKETS) in new ServiceBusClientBuilder() but still not working

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus labels Jan 22, 2025
Copy link
Contributor

@anuchandy @conniey @lmolkova

Copy link
Contributor

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@PraveenCarlsberg PraveenCarlsberg changed the title [BUG] Send message to Service bus queue giving error: Code is available on official Document but still not working [BUG] Send message to Service bus queue giving error: Code is available in official Document but still not working Jan 22, 2025
@PraveenCarlsberg
Copy link
Author

Instead specific version used my project default azure version

com.azure
azure-messaging-servicebus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus
Projects
None yet
Development

No branches or pull requests

2 participants