You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by el...@apache.org on 2015/10/09 00:40:54 UTC

svn commit: r1707630 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/java/org/apache/solr/core/SolrResourceLoader.java

Author: elyograg
Date: Thu Oct  8 22:40:53 2015
New Revision: 1707630

URL: http://svn.apache.org/viewvc?rev=1707630&view=rev
Log:
SOLR-6188: Only load resources in SOLRHOME/lib once.

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1707630&r1=1707629&r2=1707630&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Thu Oct  8 22:40:53 2015
@@ -71,6 +71,11 @@ New Features
 
 * SOLR-8038: Add the StatsStream to the Streaming API and wire it into the SQLHandler (Joel Bernstein)
 
+* SOLR-6188: Skip the automatic loading of resources in the "lib" subdirectory
+  by SolrResourceLoader, but only if we are loading resources from the solr
+  home directory.  Fixes the inability to use ICU analysis components with a
+  "solr." prefix on the classname. (Shawn Heisey)
+
 Optimizations
 ----------------------
 * SOLR-7876: Speed up queries and operations that use many terms when timeAllowed has not been

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java?rev=1707630&r1=1707629&r2=1707630&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java Thu Oct  8 22:40:53 2015
@@ -140,8 +140,16 @@ public class SolrResourceLoader implemen
     }
     
     this.classLoader = createClassLoader(null, parent);
-    addToClassLoader("./lib/", null, true);
-    reloadLuceneSPI();
+    /* 
+     * Skip the lib subdirectory when we are loading from the solr home.
+     * Otherwise load it, so core lib directories still get loaded.
+     * The default sharedLib will pick this up later, and if the user has
+     * changed sharedLib, then we don't want to load that location anyway.
+     */
+    if (! this.instanceDir.equals(SolrResourceLoader.locateSolrHome())) {
+      addToClassLoader("./lib/", null, true);
+      reloadLuceneSPI();
+    }
     this.coreProperties = coreProperties;
   }