Expand my Community achievements bar.

Join expert-led, customer-led sessions on Adobe Experience Manager Assets on August 20th at our Skill Exchange.
SOLVED

OSGI bundle inactive

Avatar

Level 1

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?

RobbieRami_0-1750258526295.png

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 4

True, as you upgraded zookeeper version and SOLR uses zookeper internally, the SOLR versions should be aligned and support the latest version of zookeeper. 

View solution in original post

5 Replies

Avatar

Community Advisor

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

Kostiantyn Diachenko



Check out AEM VLT Intellij plugin


Avatar

Level 4

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>

Avatar

Level 4

Screenshot 2025-06-19 at 07.33.17.png

@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.

Avatar

Level 1

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!

RobbieRami_0-1750329429535.png

 

Avatar

Correct answer by
Level 4

True, as you upgraded zookeeper version and SOLR uses zookeper internally, the SOLR versions should be aligned and support the latest version of zookeeper.