2

When start solr cloud with external zookeeper cluster, got error:

java.lang.NoClassDefFoundError: org/apache/lucene/analysis/util/TokenizerFactory

I checked the configuration, but didn't found any error.

The additional 3rd party jars are added at: solr-6.2.0-cloud/server/lib/ext, is that a problem ?

What could possibly be the reason? thanks.

Eric
  • 22,183
  • 20
  • 145
  • 196

2 Answers2

1

I have solved the issue.

Reason:

Didn't add 3rd party jars in a proper location, and caused jvm not be able to find some class.

This seems to be a special requirement when run in solr cloud mode.

Solution:

First put jars in $SOLR_BASE/dist, or other proper location.

Then specify location of additional jar via <lib> tag in solrconfig.xml.

e.g
    <lib dir="../../../dist/ext/" regex="jcseg-analyzer-\d.*\.jar" />
    <lib dir="../../../dist/ext/" regex="jcseg-core-\d.*\.jar" />
    <lib dir="../../../dist/ext/" regex="postgresql-\d.*\.jar" />

Then upload the config to zookeeper, reload the solr collection, then it will work.

Refer:

Simeon Leyzerzon
  • 18,658
  • 9
  • 54
  • 82
Eric
  • 22,183
  • 20
  • 145
  • 196
0

You didn't need any external jar for setup external zookeeper. it may be because of other changes you made in solr config fie or schema file

How to setup external zookeeper with solr

jai dutt
  • 780
  • 6
  • 13
  • I added the jar for jdbc & customized lucene analyser, not for zookeeper. Before I add the jars, it works. I am wondering whether the additional jars effected the classloader and caused the issue. – Eric Nov 05 '16 at 10:06