HoustonPutman commented on a change in pull request #783:
URL: https://github.com/apache/solr/pull/783#discussion_r839995367



##########
File path: 
solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/JDBCStream.java
##########
@@ -275,12 +277,10 @@ public void setStreamContext(StreamContext context) {
     this.streamContext = context;
   }
 
-  /** Opens the JDBCStream */
-  public void open() throws IOException {
-
+  protected Driver getDriver() throws IOException {
     try {
       if (null != driverClassName) {
-        Class.forName(driverClassName);
+        Class.forName(driverClassName, true, getClass().getClassLoader());

Review comment:
       So `Class.forName(className)` actually uses 
`ClassLoader.getClassLoader(Reflection.getCallerClass())`, which apparently 
does not work the same as `getClass().getClassLoader()`.
   
   Unfortunately we can't use SolrResourceLoader here, because streams are in 
solrj for some reason and SolrResourceLoader is unsurprisingly in core. But 
agree that now that we better control thread classloaders, we should use that 
instead.




-- 
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-unsubscr...@solr.apache.org

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



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

Reply via email to