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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Jsoup jar does not installed in OSGi Bundle

Avatar

Level 3

Hello Community!

For the better understanding of OSGi and Sling Model, I was working on this tutorial Adobe Experience Manager Help | Creating a HTML Template Language and Sling Model DOM parser compone...

At the Deploy the bundle to AEM section, I have a problem install Jsoup.

On the note, If  I get error message at JSoup, I need to remove version from Manufest file so I did.

However, I still have problem install the Jsoup

1317329_pastedImage_1.png

I have jsoup in pom.xml file as its dependency

1317330_pastedImage_2.png

Also I could see the jar file under Maven Dependencies

1317331_pastedImage_3.png

Does anybody know what I make mistake ?

Thanks!

Ryu

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Even if you have included dependency

1317966_pastedImage_0.png

You have to add the JSOUP JAR to AEM as well. See the below screenshot and steps to follow in the article.

1317990_pastedImage_1.png

Hope this helps!!

~Ratna

View solution in original post

6 Replies

Avatar

Level 7

For any 3rd party Jar(not provided by the Felix container), you need to bundle it and send or embed it in your current bundle. Take a look at java - OSGI - handling 3rd party JARs required by a bundle - Stack Overflow . It talks about similar thing.

Hope this helps..

Avatar

Correct answer by
Community Advisor

Hi,

Even if you have included dependency

1317966_pastedImage_0.png

You have to add the JSOUP JAR to AEM as well. See the below screenshot and steps to follow in the article.

1317990_pastedImage_1.png

Hope this helps!!

~Ratna

Avatar

Level 3

Hello Everyone!

Thanks to all the replay. I could resolved the problem.

I installed individual jsoup jar to AEM, and removed all the version number from Manifest file.

Cheers!

Ryu

Avatar

Level 1

We had to more to get JSoup working in our project  for AEM 6.3 -- alot more.  Here is an extract from our pom.xml(It may not be complete, notice we had to pull down the libraries manually to make things work.):

<properties>

   ...

   <system.dependencies>${project.basedir}/lib</system.dependencies>

</properties>

<dependencyManagement>

   <dependencies>

   <dependency>

...

<dependency>

   <groupId>org.apache.tapestry</groupId>

   <artifactId>tapestry-json</artifactId>

   <version>5.4.1</version>

   <type>jar</type>

   <scope>system</scope>

   <systemPath>${system.dependencies}/org.apache.tapestry-5.4.1.jar</systemPath>

</dependency>

...

<!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
<dependency>

   <groupId>org.jsoup</groupId>

   <artifactId>jsoup</artifactId>

   <version>1.10.3</version>

   <type>jar</type>

   <scope>system</scope>

   <systemPath>${system.dependencies}/jsoup-1.10.3.jar</systemPath>

</dependency>

<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>

   <groupId>com.google.code.gson</groupId>

   <artifactId>gson</artifactId>

   <version>2.8.1</version>

   <type>jar</type>

   <scope>system</scope>

   <systemPath>${system.dependencies}/gson-2.8.1.jar</systemPath>

</dependency>

...

</dependencies>

</dependencyManagement>