Dataimport: Could not load driver: com.mysql.jdbc.Driver

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Dataimport: Could not load driver: com.mysql.jdbc.Driver

Ruixiang Zhang
*I got the following error for dataimport:*

*Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
load driver: com.mysql.jdbc.Driver*

I have the following files:

\example-DIH\solr\db\conf\   solrconfig.xml, schema.xml, db-data-config.xml,
dataimport.properties
\example-DIH\solr\db\lib\   mysql-connector-java-5.1.13-bin.jar



*I put this code to solrconfig.xml:*

   <requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
    <lst name="defaults">
        <str name="config">db-data-config.xml</str>
    </lst>
  </requestHandler>

*And these in db-data-config.xml:*

<?xml version="1.0" encoding="iso-8859-1"?>

<dataConfig>
  <dataSource type="JdbcDataSource"
              driver="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost/mydata"
              user="myuser"
              password="********"/>
  <document>
    <entity name="id"
            query="select id,title,url from title_copy">
            <field column="id" name="id" />
            <field column="title" name="title" />
            <field column="url" name="url" />
    </entity>
  </document>
</dataConfig>



Solr server has been restarted after these change.


Any hint or suggestions will be appreciated!!!

Thanks
Richard
Reply | Threaded
Open this post in threaded view
|

Re: Dataimport: Could not load driver: com.mysql.jdbc.Driver

Koji Sekiguchi
(10/12/05 18:38), Ruixiang Zhang wrote:

> *I got the following error for dataimport:*
>
> *Full Import failed
> org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
> load driver: com.mysql.jdbc.Driver*
>
> I have the following files:
>
> \example-DIH\solr\db\conf\   solrconfig.xml, schema.xml, db-data-config.xml,
> dataimport.properties
> \example-DIH\solr\db\lib\   mysql-connector-java-5.1.13-bin.jar

I guess the problem is the permission of the driver file?

Koji
--
http://www.rondhuit.com/en/
Reply | Threaded
Open this post in threaded view
|

Re: Dataimport: Could not load driver: com.mysql.jdbc.Driver

Ruixiang Zhang
Thanks Koji.

I just tried to change the permission of the driver file to 777, still can
not found the driver.

I put the driver into the folder with the original driver is and deleted the
original one. I don't know why solr can find the original one (if I don't
change anything), but not this one.

Thanks
Richard


On Sun, Dec 5, 2010 at 2:46 AM, Koji Sekiguchi <[hidden email]> wrote:

> (10/12/05 18:38), Ruixiang Zhang wrote:
>
>> *I got the following error for dataimport:*
>>
>>
>> *Full Import failed
>> org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
>> load driver: com.mysql.jdbc.Driver*
>>
>> I have the following files:
>>
>> \example-DIH\solr\db\conf\   solrconfig.xml, schema.xml,
>> db-data-config.xml,
>> dataimport.properties
>> \example-DIH\solr\db\lib\   mysql-connector-java-5.1.13-bin.jar
>>
>
> I guess the problem is the permission of the driver file?
>
> Koji
> --
> http://www.rondhuit.com/en/
>
Reply | Threaded
Open this post in threaded view
|

Re: Dataimport: Could not load driver: com.mysql.jdbc.Driver

Ruixiang Zhang
And here are the logs:


Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.DataImportHandler
processConfiguration
INFO: Processing configuration from solrconfig.xml:
{config=db-data-config.xml}
Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.DataImporter
loadDataConfig
INFO: Data Configuration loaded successfully
Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.DataImporter
verifyWithSchema
INFO: The field :title present in DataConfig does not have a counterpart in
Solr Schema
Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.DataImporter
verifyWithSchema
INFO: The field :url present in DataConfig does not have a counterpart in
Solr Schema
Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.DataImporter
doFullImport
INFO: Starting Full Import
Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.SolrWriter
readIndexerProperties
INFO: Read dataimport.properties
Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.DataImporter
doFullImport
SEVERE: Full Import failed
*org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
load driver: com.mysql.jdbc.Driver* Processing Document # 1
        at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:72)
        at
org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:114)
        at
org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource.java:62)
        at
org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:304)
        at
org.apache.solr.handler.dataimport.ContextImpl.getDataSource(ContextImpl.java:94)
        at
org.apache.solr.handler.dataimport.SqlEntityProcessor.init(SqlEntityProcessor.java:52)
        at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.init(EntityProcessorWrapper.java:71)
        at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:319)
        at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:242)
        at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:180)
        at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:331)
        at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:389)
        at
org.apache.solr.handler.dataimport.DataImportHandler.handleRequestBody(DataImportHandler.java:203)
        at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
        at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
        at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
        at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
        at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:285)
        at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
        at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
        at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
*Caused by: java.lang.ClassNotFoundException: Unable to load
com.mysql.jdbc.Driver or
org.apache.solr.handler.dataimport.com.mysql.jdbc.Driver*
        at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:738)
        at
org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:112)
        ... 32 more
Caused by: org.apache.solr.common.SolrException: Error loading class
'com.mysql.jdbc.Driver'
        at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:375)
        at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:728)
        ... 33 more
*Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver*
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:579)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:359)
        ... 34 more
Dec 5, 2010 2:00:23 AM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
Dec 5, 2010 2:00:23 AM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback


Thanks
Richard



On Sun, Dec 5, 2010 at 2:56 AM, Ruixiang Zhang <[hidden email]> wrote:

> Thanks Koji.
>
> I just tried to change the permission of the driver file to 777, still can
> not found the driver.
>
> I put the driver into the folder with the original driver is and deleted
> the original one. I don't know why solr can find the original one (if I
> don't change anything), but not this one.
>
> Thanks
> Richard
>
>
> On Sun, Dec 5, 2010 at 2:46 AM, Koji Sekiguchi <[hidden email]> wrote:
>
>> (10/12/05 18:38), Ruixiang Zhang wrote:
>>
>>> *I got the following error for dataimport:*
>>>
>>>
>>> *Full Import failed
>>> org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
>>> load driver: com.mysql.jdbc.Driver*
>>>
>>> I have the following files:
>>>
>>> \example-DIH\solr\db\conf\   solrconfig.xml, schema.xml,
>>> db-data-config.xml,
>>> dataimport.properties
>>> \example-DIH\solr\db\lib\   mysql-connector-java-5.1.13-bin.jar
>>>
>>
>> I guess the problem is the permission of the driver file?
>>
>> Koji
>> --
>> http://www.rondhuit.com/en/
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Dataimport: Could not load driver: com.mysql.jdbc.Driver

Ruixiang Zhang
Hi Koji

I finally found the reason for this problem:

I download the tar file of the driver and unzip it in windows. Then I put
the jar file into the server. I don' t know why, but it doesn't work. It
works when I put the tar file and unzip it in the server.

Thanks a lot for your time!!!
Richard



On Sun, Dec 5, 2010 at 3:02 AM, Ruixiang Zhang <[hidden email]> wrote:

> And here are the logs:
>
>
> Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.DataImportHandler
> processConfiguration
> INFO: Processing configuration from solrconfig.xml:
> {config=db-data-config.xml}
> Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.DataImporter
> loadDataConfig
> INFO: Data Configuration loaded successfully
> Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.DataImporter
> verifyWithSchema
> INFO: The field :title present in DataConfig does not have a counterpart in
> Solr Schema
> Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.DataImporter
> verifyWithSchema
> INFO: The field :url present in DataConfig does not have a counterpart in
> Solr Schema
> Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.DataImporter
> doFullImport
> INFO: Starting Full Import
> Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.SolrWriter
> readIndexerProperties
> INFO: Read dataimport.properties
> Dec 5, 2010 2:00:23 AM org.apache.solr.handler.dataimport.DataImporter
> doFullImport
> SEVERE: Full Import failed
> *org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
> load driver: com.mysql.jdbc.Driver* Processing Document # 1
>         at
> org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:72)
>         at
> org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:114)
>         at
> org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource.java:62)
>         at
> org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:304)
>         at
> org.apache.solr.handler.dataimport.ContextImpl.getDataSource(ContextImpl.java:94)
>         at
> org.apache.solr.handler.dataimport.SqlEntityProcessor.init(SqlEntityProcessor.java:52)
>         at
> org.apache.solr.handler.dataimport.EntityProcessorWrapper.init(EntityProcessorWrapper.java:71)
>         at
> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:319)
>         at
> org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:242)
>         at
> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:180)
>         at
> org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:331)
>         at
> org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:389)
>         at
> org.apache.solr.handler.dataimport.DataImportHandler.handleRequestBody(DataImportHandler.java:203)
>         at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
>         at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
>         at
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
>         at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
>         at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
>         at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>         at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
>         at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>         at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
>         at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>         at org.mortbay.jetty.Server.handle(Server.java:285)
>         at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
>         at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
>         at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
>         at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> *Caused by: java.lang.ClassNotFoundException: Unable to load
> com.mysql.jdbc.Driver or
> org.apache.solr.handler.dataimport.com.mysql.jdbc.Driver*
>         at
> org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:738)
>         at
> org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:112)
>         ... 32 more
> Caused by: org.apache.solr.common.SolrException: Error loading class
> 'com.mysql.jdbc.Driver'
>         at
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:375)
>         at
> org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:728)
>         ... 33 more
> *Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver*
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>         at
> java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:579)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:242)
>         at
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:359)
>         ... 34 more
> Dec 5, 2010 2:00:23 AM org.apache.solr.update.DirectUpdateHandler2 rollback
> INFO: start rollback
> Dec 5, 2010 2:00:23 AM org.apache.solr.update.DirectUpdateHandler2 rollback
> INFO: end_rollback
>
>
> Thanks
> Richard
>
>
>
>
> On Sun, Dec 5, 2010 at 2:56 AM, Ruixiang Zhang <[hidden email]> wrote:
>
>> Thanks Koji.
>>
>> I just tried to change the permission of the driver file to 777, still can
>> not found the driver.
>>
>> I put the driver into the folder with the original driver is and deleted
>> the original one. I don't know why solr can find the original one (if I
>> don't change anything), but not this one.
>>
>> Thanks
>> Richard
>>
>>
>> On Sun, Dec 5, 2010 at 2:46 AM, Koji Sekiguchi <[hidden email]>wrote:
>>
>>> (10/12/05 18:38), Ruixiang Zhang wrote:
>>>
>>>> *I got the following error for dataimport:*
>>>>
>>>>
>>>> *Full Import failed
>>>> org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
>>>> load driver: com.mysql.jdbc.Driver*
>>>>
>>>> I have the following files:
>>>>
>>>> \example-DIH\solr\db\conf\   solrconfig.xml, schema.xml,
>>>> db-data-config.xml,
>>>> dataimport.properties
>>>> \example-DIH\solr\db\lib\   mysql-connector-java-5.1.13-bin.jar
>>>>
>>>
>>> I guess the problem is the permission of the driver file?
>>>
>>> Koji
>>> --
>>> http://www.rondhuit.com/en/
>>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Dataimport: Could not load driver: com.mysql.jdbc.Driver

stockii
maybe encoding !?
Reply | Threaded
Open this post in threaded view
|

Re: Dataimport: Could not load driver: com.mysql.jdbc.Driver

guptavaibhav35
In reply to this post by Ruixiang Zhang
Hi,
Kindly help me solve the issue when I am connecting NEO4j with solr. I am
facing this issue in my log file while I have the jar file of neo4j driver
in the lib folder of my core.

Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException:
org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
load driver: org.neo4j.jdbc.Driver Processing Document # 1
        at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:271)
        at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:424)
        at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:483)
        at
org.apache.solr.handler.dataimport.DataImporter.lambda$runAsync$0(DataImporter.java:466)
        at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.RuntimeException:
org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
load driver: org.neo4j.jdbc.Driver Processing Document # 1
        at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:417)
        at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:330)
        at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:233)
        ... 4 more
Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException:
Could not load driver: org.neo4j.jdbc.Driver Processing Document # 1
        at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:69)
        at
org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:159)
        at
org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource.java:80)
        at
org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:397)
        at
org.apache.solr.handler.dataimport.ContextImpl.getDataSource(ContextImpl.java:100)
        at
org.apache.solr.handler.dataimport.SqlEntityProcessor.init(SqlEntityProcessor.java:53)
        at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.init(EntityProcessorWrapper.java:77)
        at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:434)
        at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:415)
        ... 6 more
Caused by: java.lang.ClassNotFoundException: Unable to load
org.neo4j.jdbc.Driver or
org.apache.solr.handler.dataimport.org.neo4j.jdbc.Driver
        at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:935)
        at
org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:157)
        ... 13 more
Caused by: org.apache.solr.common.SolrException: Error loading class
'org.neo4j.jdbc.Driver'
        at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:557)
        at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:488)
        at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:926)
        ... 14 more
Caused by: java.lang.ClassNotFoundException: org.neo4j.jdbc.Driver
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
        at
java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:864)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:415)
        at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:541)
        ... 16 more



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: Dataimport: Could not load driver: com.mysql.jdbc.Driver

Erick Erickson
Try starting Solr with the “-v” option. That will echo all the jars that are loaded and the paths.

Where _exactly_ is the jar file? You say “in the lib folder of my core”, but that leaves a lot of room for interpretation.

Are you running stand-alone or SolrCloud? Exactly how do you start Solr?

Details matter

Best,
Erick

> On Oct 9, 2019, at 3:07 AM, guptavaibhav35 <[hidden email]> wrote:
>
> Hi,
> Kindly help me solve the issue when I am connecting NEO4j with solr. I am
> facing this issue in my log file while I have the jar file of neo4j driver
> in the lib folder of my core.
>
> Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException:
> org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
> load driver: org.neo4j.jdbc.Driver Processing Document # 1
> at
> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:271)
> at
> org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:424)
> at
> org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:483)
> at
> org.apache.solr.handler.dataimport.DataImporter.lambda$runAsync$0(DataImporter.java:466)
> at java.base/java.lang.Thread.run(Thread.java:835)
> Caused by: java.lang.RuntimeException:
> org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
> load driver: org.neo4j.jdbc.Driver Processing Document # 1
> at
> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:417)
> at
> org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:330)
> at
> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:233)
> ... 4 more
> Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException:
> Could not load driver: org.neo4j.jdbc.Driver Processing Document # 1
> at
> org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:69)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:159)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource.java:80)
> at
> org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:397)
> at
> org.apache.solr.handler.dataimport.ContextImpl.getDataSource(ContextImpl.java:100)
> at
> org.apache.solr.handler.dataimport.SqlEntityProcessor.init(SqlEntityProcessor.java:53)
> at
> org.apache.solr.handler.dataimport.EntityProcessorWrapper.init(EntityProcessorWrapper.java:77)
> at
> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:434)
> at
> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:415)
> ... 6 more
> Caused by: java.lang.ClassNotFoundException: Unable to load
> org.neo4j.jdbc.Driver or
> org.apache.solr.handler.dataimport.org.neo4j.jdbc.Driver
> at
> org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:935)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:157)
> ... 13 more
> Caused by: org.apache.solr.common.SolrException: Error loading class
> 'org.neo4j.jdbc.Driver'
> at
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:557)
> at
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:488)
> at
> org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:926)
> ... 14 more
> Caused by: java.lang.ClassNotFoundException: org.neo4j.jdbc.Driver
> at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
> at
> java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:864)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> at java.base/java.lang.Class.forName0(Native Method)
> at java.base/java.lang.Class.forName(Class.java:415)
> at
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:541)
> ... 16 more
>
>
>
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply | Threaded
Open this post in threaded view
|

Re: Dataimport: Could not load driver: com.mysql.jdbc.Driver

Alexandre Rafalovitch
Try referencing the jar directly (by absolute path) with a statement
in the solrconfig.xml (and reloading the core).
The DIH example shipped with Solr shows how it works.
This will help to see if the problem with not finding the jar or something else.

Regards,
   Alex.

On Wed, 9 Oct 2019 at 09:14, Erick Erickson <[hidden email]> wrote:

>
> Try starting Solr with the “-v” option. That will echo all the jars that are loaded and the paths.
>
> Where _exactly_ is the jar file? You say “in the lib folder of my core”, but that leaves a lot of room for interpretation.
>
> Are you running stand-alone or SolrCloud? Exactly how do you start Solr?
>
> Details matter
>
> Best,
> Erick
>
> > On Oct 9, 2019, at 3:07 AM, guptavaibhav35 <[hidden email]> wrote:
> >
> > Hi,
> > Kindly help me solve the issue when I am connecting NEO4j with solr. I am
> > facing this issue in my log file while I have the jar file of neo4j driver
> > in the lib folder of my core.
> >
> > Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException:
> > org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
> > load driver: org.neo4j.jdbc.Driver Processing Document # 1
> >       at
> > org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:271)
> >       at
> > org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:424)
> >       at
> > org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:483)
> >       at
> > org.apache.solr.handler.dataimport.DataImporter.lambda$runAsync$0(DataImporter.java:466)
> >       at java.base/java.lang.Thread.run(Thread.java:835)
> > Caused by: java.lang.RuntimeException:
> > org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
> > load driver: org.neo4j.jdbc.Driver Processing Document # 1
> >       at
> > org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:417)
> >       at
> > org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:330)
> >       at
> > org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:233)
> >       ... 4 more
> > Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException:
> > Could not load driver: org.neo4j.jdbc.Driver Processing Document # 1
> >       at
> > org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:69)
> >       at
> > org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:159)
> >       at
> > org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource.java:80)
> >       at
> > org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:397)
> >       at
> > org.apache.solr.handler.dataimport.ContextImpl.getDataSource(ContextImpl.java:100)
> >       at
> > org.apache.solr.handler.dataimport.SqlEntityProcessor.init(SqlEntityProcessor.java:53)
> >       at
> > org.apache.solr.handler.dataimport.EntityProcessorWrapper.init(EntityProcessorWrapper.java:77)
> >       at
> > org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:434)
> >       at
> > org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:415)
> >       ... 6 more
> > Caused by: java.lang.ClassNotFoundException: Unable to load
> > org.neo4j.jdbc.Driver or
> > org.apache.solr.handler.dataimport.org.neo4j.jdbc.Driver
> >       at
> > org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:935)
> >       at
> > org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:157)
> >       ... 13 more
> > Caused by: org.apache.solr.common.SolrException: Error loading class
> > 'org.neo4j.jdbc.Driver'
> >       at
> > org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:557)
> >       at
> > org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:488)
> >       at
> > org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:926)
> >       ... 14 more
> > Caused by: java.lang.ClassNotFoundException: org.neo4j.jdbc.Driver
> >       at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
> >       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
> >       at
> > java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:864)
> >       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> >       at java.base/java.lang.Class.forName0(Native Method)
> >       at java.base/java.lang.Class.forName(Class.java:415)
> >       at
> > org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:541)
> >       ... 16 more
> >
> >
> >
> > --
> > Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>