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

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

While testing the latest patch, I came across another situation that appears to 
be a separate bug.  This problem happens with a vanilla branch_4x, but also 
happens with my patch.

What I did was set sharedLib to foo, then moved icu4j-49.1.jar from lib to foo, 
both under solr.solr.home.  Some of my jars were in the automatically added 
lib, and one of them was in the explicitly stated foo.

Splitting the libs in this way resulted in the following log output, followed 
by the same exception mentioned in a comment above - it was unable to find 
ICUTokenizer.

{noformat}
INFO  - 2013-05-25 02:25:09.890; org.apache.solr.core.CoreContainer; New 
CoreContainer 1473971679
INFO  - 2013-05-25 02:25:09.891; org.apache.solr.core.CoreContainer; Loading 
CoreContainer using Solr Home: '/index/solr4/'
INFO  - 2013-05-25 02:25:09.891; org.apache.solr.core.SolrResourceLoader; new 
SolrResourceLoader for directory: '/index/solr4/'
INFO  - 2013-05-25 02:25:09.893; org.apache.solr.core.SolrResourceLoader; 
Adding 'file:/index/solr4/lib/mysql-connector-java-5.1.22-bin.jar' to 
classloader
INFO  - 2013-05-25 02:25:09.893; org.apache.solr.core.SolrResourceLoader; 
Adding 'file:/index/solr4/lib/solr-dataimporthandler-4.4-SNAPSHOT.jar' to 
classloader
INFO  - 2013-05-25 02:25:09.895; org.apache.solr.core.SolrResourceLoader; 
Adding 'file:/index/solr4/lib/lucene-analyzers-icu-4.4-SNAPSHOT.jar' to 
classloader
INFO  - 2013-05-25 02:25:10.306; org.apache.solr.core.CoreContainer; loading 
shared library: /index/solr4/foo
INFO  - 2013-05-25 02:25:10.306; org.apache.solr.core.SolrResourceLoader; 
Adding 'file:/index/solr4/foo/icu4j-49.1.jar' to classloader
{noformat}

At first I was thinking it might be an object visibility problem, so I tried 
making replaceClassLoader synchronized and then tried making classLoader 
volatile, neither change made it work.  If all of the jars are in either lib or 
foo, then everything works.

                
> 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
>
>         Attachments: SOLR-4852.patch, SOLR-4852.patch
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to