Reputation: 25004
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.
Upvotes: 2
Views: 3890
Reputation: 25004
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:
Upvotes: 2
Reputation: 790
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
Upvotes: 0