Cannot resolve dependency for Microsoft service bus | Community
Skip to main content
Level 2
September 23, 2019

Cannot resolve dependency for Microsoft service bus

  • September 23, 2019
  • 1 reply
  • 2148 views

Hello,

I have added following dependency to my pom.xml -

<dependency>

    <groupId>com.microsoft.azure</groupId>

    <artifactId>azure-servicebus</artifactId>

    <version>3.0.0</version>

    <scope>provided</scope>

</dependency>

Build is successful, but bundle says cannot resolve it. So, I added it to export package -

<Export-Package>

                          com.microsoft.azure.servicebus.*;

  </Export-Package>

now it resolves the service-bus dependency, but there are several other dependencies that bundle can't resolve, example -

om.microsoft.azure.proton.transport.proxy -- Cannot be resolved

com.microsoft.azure.proton.transport.proxy.impl -- Cannot be resolved

com.microsoft.azure.proton.transport.ws -- Cannot be resolved

com.microsoft.azure.proton.transport.ws.impl -- Cannot be resolved

io.netty.handler.codec.http,version=[4.1,5) -- Cannot be resolved

..

If I add all these dependencies, some in export package/import-package it resolves all but local instance is extremely slow and crashes.Is there better way to add the dependencies required for azure service-bus ?

Thank You!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Adobe Employee
September 23, 2019

As far as I can check, there is no appropriate bundle exists to use in OSGi specific application. There are other ways to solve this issue.

  • Create a web service (pure standalone java application) and post require details to web service rather handling at AEM site.
  • Use maven embed dependencies concept to embed third-party jars[1] into your bundle and make third-party classes to available at the runtime.  More info at [1]

[1] Embedding third party jar into bundle

Level 2
September 23, 2019

Thank you! Approach #2 may work for local instance, but for other environments (Dev,QA etc) do I have to add jar to each environment ?