You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Walter Ferrara (JIRA)" <ji...@apache.org> on 2008/08/26 09:47:44 UTC
[jira] Created: (SOLR-726) driver and datasources are not loaded
using the multicore lib aware SolrResourceLoader
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
Priority: Minor
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.
[jira] Resolved: (SOLR-726) driver and datasources are not loaded
using the multicore lib aware SolrResourceLoader
Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shalin Shekhar Mangar resolved SOLR-726.
----------------------------------------
Resolution: Fixed
Committed revision 690131.
Thanks Walter and Noble!
> 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, 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.
[jira] Commented: (SOLR-726) driver and datasources are not loaded
using the multicore lib aware SolrResourceLoader
Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
[ 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.
Re: [jira] Updated: (SOLR-726) driver and datasources are not loaded using the multicore lib aware SolrResourceLoader
Posted by Grant Ingersoll <gs...@apache.org>.
I solved this using:
http://www.kfu.com/~nsayer/Java/dyn-jdbc.html
-Grant
On Aug 29, 2008, at 1:04 AM, Shalin Shekhar Mangar (JIRA) wrote:
>
> [ https://issues.apache.org/jira/browse/SOLR-726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> ]
>
> Shalin Shekhar Mangar updated SOLR-726:
> ---------------------------------------
>
> Attachment: SOLR-726.patch
>
> A hackish work around to the class loader issue.
>
> This patch tries to use SolrResourceLoader#findClass to load the
> Driver class. It tries to use DriverManager#getConnection. If that
> fails, we try to instantiate the Driver class and use the
> Driver#connect method directly bypassing the DriverManager. This
> workaround is documented in the JdbcDataSource class.
>
> I will commit this shortly.
>
>> 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, 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.
>
[jira] Updated: (SOLR-726) driver and datasources are not loaded
using the multicore lib aware SolrResourceLoader
Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shalin Shekhar Mangar updated SOLR-726:
---------------------------------------
Attachment: SOLR-726.patch
A hackish work around to the class loader issue.
This patch tries to use SolrResourceLoader#findClass to load the Driver class. It tries to use DriverManager#getConnection. If that fails, we try to instantiate the Driver class and use the Driver#connect method directly bypassing the DriverManager. This workaround is documented in the JdbcDataSource class.
I will commit this shortly.
> 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, 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.
[jira] Updated: (SOLR-726) driver and datasources are not loaded
using the multicore lib aware SolrResourceLoader
Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Noble Paul updated SOLR-726:
----------------------------
Attachment: SOLR-726.patch
classloading is done using SolrCore#getResourceLoader()#findClass(name)
> 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.