Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6188

solr.ICUFoldingFilterFactory causes NoClassDefFoundError: o/a/l/a/icu/ICUFoldingFilter

    XMLWordPrintableJSON

Details

    Description

      When fully qualified class name is used in schema.xml

      org.apache.lucene.analysis.icu.ICUFoldingFilterFactory

      it works. However as documented in confluence and wiki, when solr.ICUFoldingFilterFactory is used it throws following exception.

      This is true for both released 4.8.1 version and trunk r1604168
      following type works :

          
           <fieldType name="folded2" class="solr.TextField">
            <analyzer>
              <tokenizer class="solr.StandardTokenizerFactory"/>
              <filter class="org.apache.lucene.analysis.icu.ICUFoldingFilterFactory"/>
            </analyzer>
          </fieldType>
      

      this does not :

       <fieldType name="folded" class="solr.TextField">
            <analyzer>
              <tokenizer class="solr.StandardTokenizerFactory"/>
              <filter class="solr.ICUFoldingFilterFactory"/>
            </analyzer>
          </fieldType>
      
      257 [main] ERROR org.apache.solr.core.SolrCore  – Error loading core:java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/apache/lucene/analysis/icu/ICUFoldingFilter
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
      	at org.apache.solr.core.CoreContainer.load(CoreContainer.java:301)
      	at org.apache.solr.servlet.SolrDispatchFilter.createCoreContainer(SolrDispatchFilter.java:190)
      	at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:137)
      	at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719)
      	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
      	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1252)
      	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
      	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
      	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
      	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
      	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
      	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609)
      	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
      	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
      	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
      	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
      	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
      	at org.eclipse.jetty.server.Server.doStart(Server.java:280)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      	at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1259)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1182)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.eclipse.jetty.start.Main.invokeMain(Main.java:473)
      	at org.eclipse.jetty.start.Main.start(Main.java:615)
      	at org.eclipse.jetty.start.Main.main(Main.java:96)
      Caused by: java.lang.NoClassDefFoundError: org/apache/lucene/analysis/icu/ICUFoldingFilter
      	at java.lang.Class.getDeclaredConstructors0(Native Method)
      	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2493)
      	at java.lang.Class.getConstructor0(Class.java:2803)
      	at java.lang.Class.getConstructor(Class.java:1718)
      	at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:602)
      	at org.apache.solr.schema.FieldTypePluginLoader$3.create(FieldTypePluginLoader.java:382)
      	at org.apache.solr.schema.FieldTypePluginLoader$3.create(FieldTypePluginLoader.java:376)
      	at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)
      	at org.apache.solr.schema.FieldTypePluginLoader.readAnalyzer(FieldTypePluginLoader.java:400)
      	at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:95)
      	at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:43)
      	at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)
      	at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:492)
      	at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:172)
      	at org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)
      	at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)
      	at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:89)
      	at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:62)
      	at org.apache.solr.core.CoreContainer.create(CoreContainer.java:554)
      	at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:261)
      	at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:253)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.icu.ICUFoldingFilter
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      	at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      	... 27 more
      

      Attachments

        1. SOLR-6188.patch
          2 kB
          Shawn Heisey
        2. SOLR-6188.patch
          2 kB
          Shawn Heisey
        3. SOLR-6188.patch
          2 kB
          Shawn Heisey
        4. SOLR-6188.patch
          2 kB
          Shawn Heisey
        5. SOLR-6188.patch
          2 kB
          Shawn Heisey
        6. SOLR-6188.patch
          0.9 kB
          Shawn Heisey
        7. SOLR-6188.patch
          0.5 kB
          Shawn Heisey

        Issue Links

          Activity

            People

              elyograg Shawn Heisey
              iorixxx Ahmet Arslan
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: