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

Shalin Shekhar Mangar commented on SOLR-726:
--------------------------------------------

Using SolrResourceLoader#findClass does not solve the problem. From the 
official documentation at 
http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/drivermanager.html

{quote}
For security reasons, the JDBC management layer will keep track of which class 
loader provided which driver. Then when the DriverManager class is opening a 
connection, it will use only drivers that come from the local file system or 
from the same class loader as the code issuing the request for a connection.
{quote}

Since the loading is done by SolrResourceLoader using a different class loader 
and the call to DriverManager.getConnection is made from a different one, a 
SQLException is thrown -- "java.sql.SQLException: No suitable driver".

> driver and datasources are not loaded using the multicore lib aware 
> SolrResourceLoader
> --------------------------------------------------------------------------------------
>
>                 Key: SOLR-726
>                 URL: https://issues.apache.org/jira/browse/SOLR-726
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.3
>            Reporter: Walter Ferrara
>            Assignee: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: SOLR-726.patch
>
>
> see 
> http://www.nabble.com/dataimporthandler-and-mysql-connector-jar-td19146229.html
> The jar containing the (jdbc) driver have to be present in the java 
> classpath. Putting it in coreX/lib or in the shared lib dir of a multicore 
> solr doesn't work

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to