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

Who Me Too'd this topic

Avatar

Level 1

Hi,

I am following the tutorial Integrating SOLR with Adobe Experience Manager  to integrate with SOLR 8.8 from AEM 6.5.7. The tutorial uses maven-scr-plugin  to create a bundle where I have a project based on Adobe archetype that uses bnd-maven-plugin. 

 I added the following dependencies to the parent pom, and same (without version) to the core sub project pom.

<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.solr-solrj</artifactId>
<version>8.7.0_1</version>
</dependency>

<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.6.2</version>
</dependency>

When I build the project the bundle is installed with all dependencies resolved (I uploaded org.apache.servicemix.bundles.solr-solrj bundle manually to the felix console for now).

 

But when I try to run the simple code snippet like

HttpSolrClient client = new HttpSolrClient.Builder(solrUrl)
.build();
SolrInputDocument documentsolr = new SolrInputDocument();
documentsolr.addField("path", path);
documentsolr.addField("time", System.nanoTime());

client.add(documentsolr);
client.commit();

 

I am getting NoClassDefFoundError for class from zookeper dependency

java.lang.NoClassDefFoundError: org/apache/zookeeper/server/ByteBufferInputStream
	at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:698)
	at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:266)
	at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:248)

 

Could you please advise how can I make sure that the required class in in the classpath of my bundle. Seems there is more to configure in bnd-maven-plugin then in the maven-scr-plugin and I can not get it right

 

Thanks ! 🙂 

Topics

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

Who Me Too'd this topic