Unable to resolve Zookeeper dependency issues | Community
Skip to main content
Level 2
September 17, 2020
Solved

Unable to resolve Zookeeper dependency issues

  • September 17, 2020
  • 3 replies
  • 2618 views

Greetings !!

I was trying to implement the below exercise :

https://helpx.adobe.com/experience-manager/using/aem_solr64.html 

I just replaced the deprecated methods used in this exercise with the latest ones.

The build is successful. 

But after deployement, solr-plugin - Core bundle is in installed state due to following issues :

org.apache.zookeeper -- Cannot be resolved
org.apache.zookeeper.data -- Cannot be resolved
org.apache.zookeeper.server.auth -- Cannot be resolved
org.json,version=[20090211.0,20090212) from com.adobe.granite.bundles.json (50)
org.json.simple -- Cannot be resolved

 

I also tried adding latest and different versions of zookeeper in pom.xml. But the issue remains same.

I also tried converting zookeeper jar into bundle and then deploying the same on felix console. Still the same issue persists.

 

Thanks in advance for help !!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Nikhil-Kumar

@sumansatija4 -
After adding the dependency in Root pom.xml you need to follow below steps:

1. Add the dependency in the ui.app pom.xml :
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</dependency>

2. Ebed this dependency in ui.app pom.xml:
<embedded>
<groupId>org.apache.zookeeper</groupId>
<target>/apps/<project-name>/install</target>
<filter>true</filter>
</embedded>


This will definitely resolve your issue. Refer my article on converting a Jar to Bundle https://aemsimplifiedbynikhil.wordpress.com/2020/08/23/resolve-dependencies-by-converting-jar-to-bundle-aem-6-5-5/

 

Thanks,
Nikhil Kumar

3 replies

Vijayalakshmi_S
Level 10
September 17, 2020

Hi @sumansatija4,

Check if the zookeeper bundle that you created is active and is exporting the desired packages with expected version (Exported Packages section of your zookeeper bundle)

Level 2
September 17, 2020
no it is not showing the exported packages.... I made below changes in pom.xml and now its working fine for me...
BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 17, 2020

@sumansatija4,

You may need to take additional steps to make available the zookeeper library in the OSGI container by making it into a bundle. Try following Adobe's guide on how to convert a jar file into an OSGI bundle, and let me know how it goes, https://helpx.adobe.com/uk/experience-manager/kb/ConvertAJarIntoOsgiBundle.html

Once the libraries are available in the OSGI container, you should be able to see the org.apache.zookeeper library as a resolved bundle. 

Nikhil-Kumar
Community Advisor
Nikhil-KumarCommunity AdvisorAccepted solution
Community Advisor
September 18, 2020

@sumansatija4 -
After adding the dependency in Root pom.xml you need to follow below steps:

1. Add the dependency in the ui.app pom.xml :
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</dependency>

2. Ebed this dependency in ui.app pom.xml:
<embedded>
<groupId>org.apache.zookeeper</groupId>
<target>/apps/<project-name>/install</target>
<filter>true</filter>
</embedded>


This will definitely resolve your issue. Refer my article on converting a Jar to Bundle https://aemsimplifiedbynikhil.wordpress.com/2020/08/23/resolve-dependencies-by-converting-jar-to-bundle-aem-6-5-5/

 

Thanks,
Nikhil Kumar