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(ClassLoader.getClassLoader(caller))`, 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]