1

Followed instructions in here https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-java-how-to-use-queues to test a java application to connect, send and recieve the messages

With version of 7.0.2 for azure-messaging-servicebus, all is working okay.

However when I update the version, getting errors either at build time or at run time.

I know it should be backward compatible and guess I am doing something wrong. I tried updating the verion of azure-core as well but no luck. Appreciate if someone could help.

7.3.0 -- java.lang.ClassNotFoundException: com.azure.core.util.AsyncCloseable

7.7.0 -- java.lang.ClassNotFoundException: com.azure.core.client.traits.TokenCredentialTrait

  • I suggest you to use the azure bom for handling the correct dependencies versions https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/boms/azure-sdk-bom/README.md – Paizo Mar 28 '22 at 11:28

1 Answers1

0
  • The 'java.lang.ClassNotFoundException' is a Java checked exception that happens when the JVM tries to load a class but cannot locate it in the classpath.
  • Generally, because the 'ClassNotFoundException' is a checked exception, it must be explicitly handled in methods that can throw it - either via the use of a 'try-catch block' or through the use of the 'throws' clause.
  • You can refer this similar SO threads for more information. Reference1 , Reference2