[
https://issues.apache.org/jira/browse/SOLR-6188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14732423#comment-14732423
]
Shawn Heisey commented on SOLR-6188:
------------------------------------
I was helping someone with a class cast exception problem on the mailing list,
and noticed that the log for 5.3.0 also says that it is loading jars in
solrhome/lib twice, just like I noticed in the 5.2.1 log. SOLR-4852 appeared
to be triggered by Solr loading twice from that location. At that time I never
tried using the fully qualified ICU class names in schema.xml, but I suspect
that it would have worked then.
I think that the root of this problem is that Solr is loading jars from that
lib directory twice. In SOLR-7771 (specifically in 5.2.1) I noticed that this
doesn't cause problems with other jars in that directory, just ICU analysis.
This may indicate that this is a bug that specifically affects ICU jars. The
way that Solr's classloader and/or the "solr." prefix mechanism works is
apparently not compatible with the way that the ICU jars work when they
register themselves. I do not know if the fault is in Solr or the ICU jars, or
perhaps both.
> solr.ICUFoldingFilterFactory causes NoClassDefFoundError:
> o/a/l/a/icu/ICUFoldingFilter
> --------------------------------------------------------------------------------------
>
> Key: SOLR-6188
> URL: https://issues.apache.org/jira/browse/SOLR-6188
> Project: Solr
> Issue Type: Bug
> Components: Schema and Analysis
> Affects Versions: 4.8.1
> Reporter: Ahmet Arslan
> Labels: ICUFoldingFilterFactory
> Fix For: 4.10
>
>
> 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 :
> {code:xml}
> <fieldType name="folded2" class="solr.TextField">
> <analyzer>
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter
> class="org.apache.lucene.analysis.icu.ICUFoldingFilterFactory"/>
> </analyzer>
> </fieldType>
> {code}
> this does not :
> {code:xml}
> <fieldType name="folded" class="solr.TextField">
> <analyzer>
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter class="solr.ICUFoldingFilterFactory"/>
> </analyzer>
> </fieldType>
> {code}
> {noformat}
> 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
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]