lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruixiang Zhang <rxzh...@gmail.com>
Subject Re: Dataimport: Could not load driver: com.mysql.jdbc.Driver
Date Sun, 05 Dec 2010 11:02:57 GMT
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 <rxzhang@gmail.com> 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 <koji@r.email.ne.jp> 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/
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message