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

Convert jars to OSGi bundles

Avatar

Avatar
Level 1
Tapan_Agrawal
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Tapan_Agrawal
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
Tapan_Agrawal
Level 1

16-05-2019

Hi,

I have a maven dependency

<dependency>

    <groupId>org.apache.hive</groupId>

    <artifactId>hive-jdbc</artifactId>

    <version>2.1.1</version>

</dependency>

The jar and its dependencies don't have any OSGi bundle definition like symbolic bundle name under the manifest file. How do I convert it into OSGi bundle so that the jar and its dependencies can be successfully installed into AEM.

Replies

Avatar

Avatar
Coach
Employee
jbrar
Employee

Likes

377 likes

Total Posts

867 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

377 likes

Total Posts

867 posts

Correct Reply

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

16-05-2019

Check [1] on how to convert jar file to osgi bundle.

[1] How to Convert a jar File into an OSGi Bundle

Avatar

Avatar
Level 1
Tapan_Agrawal
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Tapan_Agrawal
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
Tapan_Agrawal
Level 1

16-05-2019

Hi, this method applies only to jar that doesn't have any dependencies. hive-jdbc has dependency on 12 other jars. please suggest

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,086 likes

Total Posts

3,121 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,086 likes

Total Posts

3,121 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

16-05-2019

tapana19997047​ What was the outcome of [1]? If you don't need to have this package in OSGI, you can also embedd it into your application bundle.

[1] AEM Hive error

Avatar

Avatar
Validate 10
Level 3
ankurk67503819
Level 3

Likes

15 likes

Total Posts

89 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 10
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 3
ankurk67503819
Level 3

Likes

15 likes

Total Posts

89 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 10
Boost 5
Boost 3
View profile
ankurk67503819
Level 3

16-05-2019

How to embed a 3rf party jar file into our bundle as part of maven build?

Avatar

Avatar
Give Back 5
Level 4
Bharath_valse
Level 4

Likes

34 likes

Total Posts

65 posts

Correct Reply

11 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile

Avatar
Give Back 5
Level 4
Bharath_valse
Level 4

Likes

34 likes

Total Posts

65 posts

Correct Reply

11 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile
Bharath_valse
Level 4

16-05-2019

Hope this thread helps how to embed dependent jar ?

Avatar

Avatar
Validate 10
Level 3
ankurk67503819
Level 3

Likes

15 likes

Total Posts

89 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 10
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 3
ankurk67503819
Level 3

Likes

15 likes

Total Posts

89 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 10
Boost 5
Boost 3
View profile
ankurk67503819
Level 3

16-05-2019

Here in this thread we are creating an osgi bundle and manually deploying to system/consile.

But this is not the way we can do it in prod rt...

So my question is what changes we need to make in pom.xml so once the package is build this 3rd party is automatically included into our bundle and deployed into server without deploying the 3rd party jar files to system console.

Avatar

Avatar
Give Back 5
Level 4
Bharath_valse
Level 4

Likes

34 likes

Total Posts

65 posts

Correct Reply

11 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile

Avatar
Give Back 5
Level 4
Bharath_valse
Level 4

Likes

34 likes

Total Posts

65 posts

Correct Reply

11 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile
Bharath_valse
Level 4

17-05-2019

Did you try adding the osgi wrapped bundle to your apps install folder
(through code package, with the help of filter.xml) and use the maven-bundle-plugin or content-package-maven-plugin. Please refer [0] & [1] option #4

[0]

cq5 - How to use third party JAR into AEM? - Stack Overflow

[1]

Adobe CQ/Adobe AEM: How to Integrate 3rd party Jar file in CQ / WEM

Avatar

Avatar
Level 1
Tapan_Agrawal
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Tapan_Agrawal
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
Tapan_Agrawal
Level 1

21-05-2019

I tried to embed the "hive-jdbc" jar into my application bundle. Following were the changes I did.

core pom.xml

1757315_pastedImage_0.png

1757316_pastedImage_2.png

ui-apps pom.xml

1757318_pastedImage_4.png

1757317_pastedImage_3.png

main pom.xml

1757319_pastedImage_7.png

However, the application bundle is in installed stage and found this in the error.log

1757320_pastedImage_9.png

Anything I am missing here?