Unable to resolve Zookeeper dependency issues

SumanSatija4

17-09-2020

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

Accepted Solutions (1)

Accepted Solutions (1)

Nikhil-Kumar

MVP

18-09-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-bun...

 

Thanks,
Nikhil Kumar

Answers (2)

Answers (2)

BrianKasingli

MVP

17-09-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. 

Vijayalakshmi_S

MVP

17-09-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)