[jira] [Commented] (SOLR-4852) If sharedLib is set to lib, classloader fails to find classes in lib

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SOLR-4852) If sharedLib is set to lib, classloader fails to find classes in lib

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/SOLR-4852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13664859#comment-13664859 ]

Shawn Heisey commented on SOLR-4852:
------------------------------------

If sharedLib is "lib" then this is the log, and it fails to load ICUTokenizer.

{noformat}
INFO  - 2013-05-22 22:41:15.932; org.apache.solr.core.SolrResourceLoader; using system property solr.solr.home: /index/solr4
INFO  - 2013-05-22 22:41:15.941; org.apache.solr.core.CoreContainer$Initializer; looking for solr config file: /index/solr4/solr.xml
INFO  - 2013-05-22 22:41:15.947; org.apache.solr.core.CoreContainer; New CoreContainer 1473971679
INFO  - 2013-05-22 22:41:15.947; org.apache.solr.core.CoreContainer; Loading CoreContainer using Solr Home: '/index/solr4/'
INFO  - 2013-05-22 22:41:15.947; org.apache.solr.core.SolrResourceLoader; new SolrResourceLoader for directory: '/index/solr4/'
INFO  - 2013-05-22 22:41:15.949; org.apache.solr.core.SolrResourceLoader; Adding 'file:/index/solr4/lib/icu4j-49.1.jar' to classloader
INFO  - 2013-05-22 22:41:15.949; org.apache.solr.core.SolrResourceLoader; Adding 'file:/index/solr4/lib/mysql-connector-java-5.1.22-bin.jar' to classloader
INFO  - 2013-05-22 22:41:15.951; org.apache.solr.core.SolrResourceLoader; Adding 'file:/index/solr4/lib/solr-dataimporthandler-4.4-SNAPSHOT.jar' to classloader
INFO  - 2013-05-22 22:41:15.952; org.apache.solr.core.SolrResourceLoader; Adding 'file:/index/solr4/lib/lucene-analyzers-icu-4.4-SNAPSHOT.jar' to classloader
INFO  - 2013-05-22 22:41:16.250; org.apache.solr.core.CoreContainer; loading shared library: /index/solr4/lib
INFO  - 2013-05-22 22:41:16.251; org.apache.solr.core.SolrResourceLoader; Adding 'file:/index/solr4/lib/icu4j-49.1.jar' to classloader
INFO  - 2013-05-22 22:41:16.251; org.apache.solr.core.SolrResourceLoader; Adding 'file:/index/solr4/lib/mysql-connector-java-5.1.22-bin.jar' to classloader
INFO  - 2013-05-22 22:41:16.251; org.apache.solr.core.SolrResourceLoader; Adding 'file:/index/solr4/lib/solr-dataimporthandler-4.4-SNAPSHOT.jar' to classloader
INFO  - 2013-05-22 22:41:16.251; org.apache.solr.core.SolrResourceLoader; Adding 'file:/index/solr4/lib/lucene-analyzers-icu-4.4-SNAPSHOT.jar' to classloader
<snip>
ERROR - 2013-05-22 22:41:16.939; org.apache.solr.common.SolrException; null:java.lang.NoClassDefFoundError: org/apache/lucene/analysis/icu/segmentation/ICUTokenizer
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
        at java.lang.Class.getConstructor0(Class.java:2723)
        at java.lang.Class.getConstructor(Class.java:1676)
        at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:550)
        at org.apache.solr.schema.FieldTypePluginLoader$2.create(FieldTypePluginLoader.java:342)
        at org.apache.solr.schema.FieldTypePluginLoader$2.create(FieldTypePluginLoader.java:335)
        at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)
        at org.apache.solr.schema.FieldTypePluginLoader.readAnalyzer(FieldTypePluginLoader.java:362)
        at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:86)
        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:467)
        at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:164)
        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.CoreContainer.createFromLocal(CoreContainer.java:727)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:765)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:426)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:421)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        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:722)
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.icu.segmentation.ICUTokenizer
        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:423)
        at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 28 more
{noformat}

               

> If sharedLib is set to lib, classloader fails to find classes in lib
> --------------------------------------------------------------------
>
>                 Key: SOLR-4852
>                 URL: https://issues.apache.org/jira/browse/SOLR-4852
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.4
>         Environment: Linux bigindy5 2.6.32-358.6.1.el6.centos.plus.x86_64 #1 SMP Wed Apr 24 03:21:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
> java version "1.7.0_21"
> Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
>            Reporter: Shawn Heisey
>             Fix For: 5.0, 4.4
>
>
> I have some jars in the lib directory under solr.solr.home - DIH, ICU, and MySQL.  If I set sharedLib in solr.xml to "lib" then the ICUTokenizer class is not found, even though the jar is loaded (twice) during Solr startup.  If I set sharedLib to another location that doesn't exist, the jars are only loaded once and there is no problem.
> I'm using the old-style solr.xml on branch_4x revision 1485566.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]