Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Cannot resolve dependency for Microsoft service bus

Avatar

Avatar
Ignite 5
Level 2
bunny87948290
Level 2

Likes

4 likes

Total Posts

25 posts

Correct Reply

1 solution
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile

Avatar
Ignite 5
Level 2
bunny87948290
Level 2

Likes

4 likes

Total Posts

25 posts

Correct Reply

1 solution
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile
bunny87948290
Level 2

22-09-2019

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!

Replies

Avatar

Avatar
Coach
Employee
jbrar
Employee

Likes

389 likes

Total Posts

869 posts

Correct Reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Coach
Employee
jbrar
Employee

Likes

389 likes

Total Posts

869 posts

Correct Reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile
jbrar
Employee

23-09-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

Avatar

Avatar
Ignite 5
Level 2
bunny87948290
Level 2

Likes

4 likes

Total Posts

25 posts

Correct Reply

1 solution
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile

Avatar
Ignite 5
Level 2
bunny87948290
Level 2

Likes

4 likes

Total Posts

25 posts

Correct Reply

1 solution
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile
bunny87948290
Level 2

23-09-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 ?