Error loading class 'solr.ICUCollationField' whilst setting up core

Created on 25 November 2018, about 6 years ago
Updated 27 January 2025, 3 days ago

Setting up SOLR locally on my macbook pro using homebrew. After I added the downloaded config files I get this error on http://127.0.0.1:8983/solr/#/d8

d8: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core d8: Can't load schema /usr/local/opt/solr/server/solr/d8/conf/schema.xml: Plugin init failure for [schema.xml] fieldType "collated": Error loading class 'solr.ICUCollationField'

From googling it says I need to link some libraries but not really understanding. Discovered this issue which was recent that added this so wondering if it's just the install instructions haven't been updated - I've not done anything custom:

https://www.drupal.org/project/search_api_solr/issues/3009943 β†’

πŸ“Œ Task
Status

Fixed

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States mikegodin

    I was just encountering the ICUCollationField issue with Search API Solr 4.3.7 and Solr 9.8.0, and found the previous solutions did not work, but the following two solutions did work:

    1. Either add the following line to /etc/default/solr.in.sh:
    $SOLR_OPTS -Dsolr.sharedLib=/opt/solr/modules/analysis-extras/lib"

    2. Or copy the contents of:
    /opt/solr/modules/analysis-extras/lib
    to
    /opt/solr/server/solr-webapp/webapp/WEB-INF/lib

  • Hi, I have encountered the same issue with Search API Solr 4.3.7 and Solr 9.8.0. I found the following at the Logging page of Solr config;

    WARN false
    
    d8
    
    SolrConfig
    
    Configset references one or more <lib/> directives,&#8203; but <lib/> usage is disabled on this Solr node. Either remove all <lib/> tags from the relevant configset,&#8203; or <strong>enable use of this feature by setting 'solr.config.lib.enabled=true'</strong>
    

    I have taken another solution and it works.
    sudo vi /etc/default/solr.in.sh

    SOLR_OPTS="$SOLR_OPTS -Dsolr.config.lib.enabled=true"
    

    Major Changes in Solr 9.8: https://solr.apache.org/guide/solr/latest/upgrade-notes/major-changes-in-solr-9.html#solr-9-8

  • πŸ‡¨πŸ‡­Switzerland znerol

    For people running solr in containers: This can be fixed by supplying module configuration via the SOLR_MODULES environment variable.

    The following value loads all the modules referenced from solrconfig.xml currently shipped by Search API Solr module:

    SOLR_MODULES=extraction,langid,ltr,analysis-extras
    
Production build 0.71.5 2024