[ 
https://issues.apache.org/jira/browse/SOLR-5708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leonid Boytsov updated SOLR-5708:
---------------------------------

    Description: 
The lib option doesn't work and, hence, you cannot add put a solr extension jar 
in a specified library. As a workaround you can put the jar into <instance 
dir>/lib

It doesn't work for at least two reasons:
1) The instance dir is added twice: once in initLibs, and another time in 
addToClassLoader
2) When I fixed this, I found out that the filtering class for addToClassLoader 
doesn't work properly.

A rough fix is as follows, but it, probably, can't make use of Solr variables 
such as solr.solr.home. This is code changed in initLibs, I commented out 
incorrect lines:

{code}
        } else if (null != path) {
          //final File file = FileUtils.resolvePath(new 
File(loader.getInstanceDir()), path);
          final File file = new File(path);
          loader.addToClassLoader(file.getParent(), new FileFilter() {
            @Override
            public boolean accept(File pathname) {
              //return pathname.equals(file);
              return true;
            }
          }, false);
{/code}



  was:
The lib option doesn't work and, hence, you cannot add put a solr extension jar 
in a specified library. As a workaround you can put the jar into <instance 
dir>/lib

It doesn't work for at least two reasons:
1) The instance dir is added twice: once in initLibs, and another time in 
addToClassLoader
2) When I fixed this, I found out that the filtering class for addToClassLoader 
doesn't work properly.

A rough fix is as follows, but it, probably, can't make use of Solr variables 
such as solr.solr.home. This is code changed in initLibs, I commented out 
incorrect lines:

        } else if (null != path) {
          //final File file = FileUtils.resolvePath(new 
File(loader.getInstanceDir()), path);
          final File file = new File(path);
          loader.addToClassLoader(file.getParent(), new FileFilter() {
            @Override
            public boolean accept(File pathname) {
              //return pathname.equals(file);
              return true;
            }
          }, false);





> the tag lib doesn't work in solrconfig.xml
> ------------------------------------------
>
>                 Key: SOLR-5708
>                 URL: https://issues.apache.org/jira/browse/SOLR-5708
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.6, 4.6.1
>         Environment: Linux, Ubuntu, but I believe this is not related.
>            Reporter: Leonid Boytsov
>            Priority: Minor
>
> The lib option doesn't work and, hence, you cannot add put a solr extension 
> jar in a specified library. As a workaround you can put the jar into 
> <instance dir>/lib
> It doesn't work for at least two reasons:
> 1) The instance dir is added twice: once in initLibs, and another time in 
> addToClassLoader
> 2) When I fixed this, I found out that the filtering class for 
> addToClassLoader doesn't work properly.
> A rough fix is as follows, but it, probably, can't make use of Solr variables 
> such as solr.solr.home. This is code changed in initLibs, I commented out 
> incorrect lines:
> {code}
>         } else if (null != path) {
>           //final File file = FileUtils.resolvePath(new 
> File(loader.getInstanceDir()), path);
>           final File file = new File(path);
>           loader.addToClassLoader(file.getParent(), new FileFilter() {
>             @Override
>             public boolean accept(File pathname) {
>               //return pathname.equals(file);
>               return true;
>             }
>           }, false);
> {/code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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

Reply via email to