I updated org.apache.zookeeper from 3.4.6 to 3.9.2. I even added its dependencies in the pom and also tried using Embed-dependency however my bundle is in installed due to few unresolved errors. Could someone guide on how to fix them?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
True, as you upgraded zookeeper version and SOLR uses zookeper internally, the SOLR versions should be aligned and support the latest version of zookeeper.
Hi @RobbieRami ,
Did you embed your dependencies as jars via filevault-package-maven-plugin in embeddeds section?
Check this tutorial: https://medium.com/@abhijeetkumar.ak47/add-third-party-jar-in-aem-a3ae9c749f10
Use the maven-bundle-plugin to embed ZooKeeper directly into your OSGi bundle. This process generates the necessary OSGi headers and ensures proper bundle resolution
try with below config
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.1</version>
<executions>
<execution>
<goals>
<goal>bundle</goal>
</goals>
<configuration>
<instructions>
<Embed-Dependency>
org.apache.zookeeper:zookeeper:jar:3.9.2
</Embed-Dependency>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
Add dependency imports
Import-Package: org.apache.zookeeper;version="[3.9.2,4.0)"
Import-Package: org.apache.zookeeper, !sun.*, !com.sun.*
Add following in you pom.xml
<dependencies>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.9.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.1</version>
<executions>
<execution>
<goals>
<goal>bundle</goal>
</goals>
<configuration>
<instructions>
<Embed-Dependency>
org.apache.zookeeper:zookeeper:jar:3.9.2
</Embed-Dependency>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Consider upgrading to ZooKeeper 3.9.3, which addresses these vulnerabilities.
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.9.3</version>
</dependency>
@RobbieRami
(Not sure if that's a glitch, could see your message in my email, but not in here)
Could you help adding the error here, please? Thanks in advance.
Not sure, but here you go. This wasnt the case earlier as i solr package is imported already. Is this maybe due to change in ho we are embedding zookeeper? Thanks again!
Views
Replies
Total Likes
True, as you upgraded zookeeper version and SOLR uses zookeper internally, the SOLR versions should be aligned and support the latest version of zookeeper.
Views
Likes
Replies