[ 
https://issues.apache.org/jira/browse/SOLR-16131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17515428#comment-17515428
 ] 

Joel Bernstein edited comment on SOLR-16131 at 3/31/22, 4:30 PM:
-----------------------------------------------------------------

I'm going down that rabbit hole as well. I haven't dug into the module class 
loading code yet to see how it's loading the classes, but it would seem to be a 
different classloader.  The CalciteJDBCStream extends the JDBCStream in this 
case which looks like there would have been two different class loaders 
involved in instantiating parent and child classes. Perhaps calling 
super.getClass().getClassLoader() and passing that into class.forName would 
solve the issue.

Actually, that won't work. Super is the JDBCStream.

Possibly adding hook method in JDBCStream for getting the class loader is the 
way to go. Default it would return it's own class loader and subclass would 
return its own class loader.




was (Author: joel.bernstein):
I'm going down that rabbit hole as well. I haven't dug into the module class 
loading code yet to see how it's loading the classes, but it would seem to be a 
different classloader.  The CalciteJDBCStream extends the JDBCStream in this 
case which looks like there would have been two different class loaders 
involved in instantiating parent and child classes. Perhaps calling 
super.getClass().getClassLoader() and passing that into class.forName would 
solve the issue.

Actually, that won't work. Super is the JDBCStream.

> sql module cannot load Calcite driver
> -------------------------------------
>
>                 Key: SOLR-16131
>                 URL: https://issues.apache.org/jira/browse/SOLR-16131
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Joel Bernstein
>            Priority: Blocker
>             Fix For: 9.0
>
>
> After adding the sql module, using -Dsolr.modules=sql from the command line 
> on startup, sql queries throw the following error:
>  Failed to load JDBC driver for 
> 'org.apache.solr.handler.sql.CalciteSolrDriver'
> This makes the sql module inoperable.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to