You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/11/10 13:17:23 UTC

[GitHub] [solr] NazerkeBS opened a new pull request #408: SOLR-15785: Custom node level handler should use SolrResourceLoader t…

NazerkeBS opened a new pull request #408:
URL: https://github.com/apache/solr/pull/408


   
   https://issues.apache.org/jira/browse/SOLR-15785
   
   <!--
   _(If you are a project committer then you may remove some/all of the following template.)_
   
   Before creating a pull request, please file an issue in the ASF Jira system for Solr:
   
   * https://issues.apache.org/jira/projects/SOLR
   
   You will need to create an account in Jira in order to create an issue.
   
   The title of the PR should reference the Jira issue number in the form:
   
   * SOLR-####: <short description of problem or changes>
   
   SOLR must be fully capitalized. A short description helps people scanning pull requests for items they can work on.
   
   Properly referencing the issue in the title ensures that Jira is correctly updated with code review comments and commits. -->
   
   
   # Description
   
   Please provide a short description of the changes you're making with this pull request.
   
   # Solution
   
   Please provide a short description of the approach taken to implement your solution.
   
   # Tests
   
   Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [ ] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability.
   - [ ] I have created a Jira issue and added the issue ID to my pull request title.
   - [ ] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
   - [ ] I have developed this patch against the `main` branch.
   - [ ] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dsmiley commented on a change in pull request #408: SOLR-15785: Custom node level handler should use SolrResourceLoader t…

Posted by GitBox <gi...@apache.org>.
dsmiley commented on a change in pull request #408:
URL: https://github.com/apache/solr/pull/408#discussion_r747009706



##########
File path: solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
##########
@@ -344,7 +344,7 @@ public ApiInfo(PluginMetaHolder infoHolder, List<String> errs) {
         }
       } else {
         try {
-          klas = Class.forName(klassInfo.className);
+          klas = Class.forName(klassInfo.className, true, coreContainer.getResourceLoader().getClassLoader());

Review comment:
       the ClassLoader inside SolrResourceLoader is an implementation detail; SRL can find the class via `findClass`.
   `coreContainer.getResourceLoader().findClass(.klassInfo.className,Object.class)`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dsmiley merged pull request #408: SOLR-15785: Custom node level handler should use SolrResourceLoader t…

Posted by GitBox <gi...@apache.org>.
dsmiley merged pull request #408:
URL: https://github.com/apache/solr/pull/408


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dsmiley commented on pull request #408: SOLR-15785: Custom node level handler should use SolrResourceLoader t…

Posted by GitBox <gi...@apache.org>.
dsmiley commented on pull request #408:
URL: https://github.com/apache/solr/pull/408#issuecomment-965775501


   Just a contribution tip: please fill out the PR template, and feel free to remove what isn't relevant depending on the PR.  As you contribute more, delete it entirely.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dsmiley commented on a change in pull request #408: SOLR-15785: Custom node level handler should use SolrResourceLoader t…

Posted by GitBox <gi...@apache.org>.
dsmiley commented on a change in pull request #408:
URL: https://github.com/apache/solr/pull/408#discussion_r750287415



##########
File path: solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
##########
@@ -343,7 +343,12 @@ public ApiInfo(PluginMetaHolder infoHolder, List<String> errs) {
           return;
         }
       } else {
-        klas = coreContainer.getResourceLoader().findClass(klassInfo.className, Object.class);
+        try {
+          klas = coreContainer.getResourceLoader().findClass(klassInfo.className, Object.class);
+        } catch (Exception e) {
+          errs.add("Error loading class " + e.toString());

Review comment:
       Looking at the findClass code, I can see that it's exception messages are sufficiently clear.  Consequently, I think you needn't prefix by "Error loading class ".




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dsmiley commented on pull request #408: SOLR-15785: Custom node level handler should use SolrResourceLoader t…

Posted by GitBox <gi...@apache.org>.
dsmiley commented on pull request #408:
URL: https://github.com/apache/solr/pull/408#issuecomment-967472441


   Could you please add a brief CHANGES.txt entry?:
   I suggest this wording:  Custom node request handlers/endpoints that weren't in packages can now be located in JARs in solr-home/lib, not just WEB-INF/lib.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org