You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shawn Heisey (JIRA)" <ji...@apache.org> on 2013/11/12 16:42:17 UTC

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

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

Shawn Heisey edited comment on SOLR-4852 at 11/12/13 3:41 PM:
--------------------------------------------------------------

There may be some confusion about what's going on with this issue.

This issue affects 4.3 and later.  Summary: If you are putting jars in solrhome/lib then you must remove any sharedLib setting that points at this directory, either with "lib" or an explicit path.  Also, you cannot put some jars in solrhome/lib and others in a location specified by sharedLib - they must all be in the same location.

The same config won't work on 4.2.1 and earlier if you are putting jars in solrhome/lib.  The sharedLib attribute must exist and point at that location, or you will see that the classloader loads the jars, but the classes in those jars are not found when the config or schema tries to use them.  This part is something I learned today while trying to work with the older version.

I've been told that the behavior documented in this issue is not actually a problem.  I personally disagree with that assessment, but there is a workaround available.  We probably need some minor documentation changes.



was (Author: elyograg):
There may be some confusion about what's going on with this issue.

This issue affects 4.3 and later.  Summary: If you are putting jars in solrhome/lib then you must remove any sharedLib setting that points at this directory, either with "lib" or an explicit path.  Also, you cannot put some jars in solrhome/lib and others in a location specified by sharedLib - they must all be in the same location.

The same config won't work on 4.2.1 and earlier if you are putting jars in solrhome/lib.  The sharedLib attribute must exist and point at that location, or you will see that the classloader loads the jars, but the classes in those jars are not found when the config or schema tries to use them.  This part is something I learned today while trying to work with the older version.


> 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: 4.6
>
>         Attachments: SOLR-4852-test-failhard.txt, 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 was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org