You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by abhishek tiwari <te...@gmail.com> on 2015/03/19 05:35:14 UTC

not able to import Data through DIH solr 4.2.1

Please provide the basic steps to resolve the issue


Getting following error

Full Import failed:java.lang.RuntimeException:
java.lang.RuntimeException:
org.apache.solr.handler.dataimport.DataImportHandlerException: Could
not load driver: com.mysql.jdbc.Driver Processing Document # 1

Re: not able to import Data through DIH solr 4.2.1

Posted by abhishek tiwari <te...@gmail.com>.
<lib dir="/home/shopclues/solr-4.2.1/example/lib/"
regex="mysql-connector-java-5.1.22-bin.jar" />
  <lib dir="/home/shopclues/solr-4.2.1/dist/"
regex="solr-dataimporthandler-.*\.jar" />

but still not working

On Thu, Mar 19, 2015 at 10:41 AM, Alexandre Rafalovitch <ar...@gmail.com>
wrote:

> Try absolute path to the jar directory. Hard to tell whether relative
> path is correct without knowing exactly how you are running it.
>
> Regards,
>     Alex.
> ----
> Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
> http://www.solr-start.com/
>
>
> On 19 March 2015 at 01:00, abhishek tiwari <te...@gmail.com> wrote:
> > Alex thanks for replying
> > my solrconfig :
> >
> > <lib dir="../../../example/lib/" regex="mysql-connector-java-.*\.jar" />
> <
> > lib dir="../../../dist/" regex="solr-dataimporthandler-.*\.jar" />
> >
> >
> > ##
> > <requestHandler name="/dataimport" class=
> > "org.apache.solr.handler.dataimport.DataImportHandler"> <lst
> name="defaults"
> >> <str name="config">data-config-new.xml</str> </lst> </requestHandler>
> >
> >
> > On Thu, Mar 19, 2015 at 10:26 AM, Alexandre Rafalovitch <
> arafalov@gmail.com>
> > wrote:
> >
> >> > Could not load driver: com.mysql.jdbc.Driver
> >>
> >> Looks like a custom driver. Is the driver name correct? Is the library
> >> declared in solrconfig.xml? Is the library path correct (use absolute
> >> path if in doubt).
> >>
> >> Regards,
> >>    Alex.
> >>
> >> ----
> >> Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
> >> http://www.solr-start.com/
> >>
> >>
> >> On 19 March 2015 at 00:35, abhishek tiwari <te...@gmail.com>
> wrote:
> >> > Please provide the basic steps to resolve the issue
> >> >
> >> >
> >> > Getting following error
> >> >
> >> > Full Import failed:java.lang.RuntimeException:
> >> > java.lang.RuntimeException:
> >> > org.apache.solr.handler.dataimport.DataImportHandlerException: Could
> >> > not load driver: com.mysql.jdbc.Driver Processing Document # 1
> >>
>

Re: not able to import Data through DIH solr 4.2.1

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Try absolute path to the jar directory. Hard to tell whether relative
path is correct without knowing exactly how you are running it.

Regards,
    Alex.
----
Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
http://www.solr-start.com/


On 19 March 2015 at 01:00, abhishek tiwari <te...@gmail.com> wrote:
> Alex thanks for replying
> my solrconfig :
>
> <lib dir="../../../example/lib/" regex="mysql-connector-java-.*\.jar" /> <
> lib dir="../../../dist/" regex="solr-dataimporthandler-.*\.jar" />
>
>
> ##
> <requestHandler name="/dataimport" class=
> "org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"
>> <str name="config">data-config-new.xml</str> </lst> </requestHandler>
>
>
> On Thu, Mar 19, 2015 at 10:26 AM, Alexandre Rafalovitch <ar...@gmail.com>
> wrote:
>
>> > Could not load driver: com.mysql.jdbc.Driver
>>
>> Looks like a custom driver. Is the driver name correct? Is the library
>> declared in solrconfig.xml? Is the library path correct (use absolute
>> path if in doubt).
>>
>> Regards,
>>    Alex.
>>
>> ----
>> Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
>> http://www.solr-start.com/
>>
>>
>> On 19 March 2015 at 00:35, abhishek tiwari <te...@gmail.com> wrote:
>> > Please provide the basic steps to resolve the issue
>> >
>> >
>> > Getting following error
>> >
>> > Full Import failed:java.lang.RuntimeException:
>> > java.lang.RuntimeException:
>> > org.apache.solr.handler.dataimport.DataImportHandlerException: Could
>> > not load driver: com.mysql.jdbc.Driver Processing Document # 1
>>

Re: not able to import Data through DIH solr 4.2.1

Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/18/2015 11:00 PM, abhishek tiwari wrote:
> my solrconfig :
> 
> <lib dir="../../../example/lib/" regex="mysql-connector-java-.*\.jar" /> <
> lib dir="../../../dist/" regex="solr-dataimporthandler-.*\.jar" />

The way that I always recommend dealing with extra jars:

In your solr home, create a "lib" directory.  Copy all the extra jars
that you need into this directory, including the DIH jar and your jdbc
driver jar.  Remove all <lib> config elements from solrconfig.xml.

In Solr 4.2, you will also need to make sure that your solr.xml has a
sharedLib attribute on the <solr> tag, set to "lib".  On 4.3 and later,
this step is not required ... it will actually cause the jars to NOT work.

See the comment on this issue dated 12/Nov/13:

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

Thanks,
Shawn


Re: not able to import Data through DIH solr 4.2.1

Posted by abhishek tiwari <te...@gmail.com>.
Alex thanks for replying
my solrconfig :

<lib dir="../../../example/lib/" regex="mysql-connector-java-.*\.jar" /> <
lib dir="../../../dist/" regex="solr-dataimporthandler-.*\.jar" />


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


On Thu, Mar 19, 2015 at 10:26 AM, Alexandre Rafalovitch <ar...@gmail.com>
wrote:

> > Could not load driver: com.mysql.jdbc.Driver
>
> Looks like a custom driver. Is the driver name correct? Is the library
> declared in solrconfig.xml? Is the library path correct (use absolute
> path if in doubt).
>
> Regards,
>    Alex.
>
> ----
> Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
> http://www.solr-start.com/
>
>
> On 19 March 2015 at 00:35, abhishek tiwari <te...@gmail.com> wrote:
> > Please provide the basic steps to resolve the issue
> >
> >
> > Getting following error
> >
> > Full Import failed:java.lang.RuntimeException:
> > java.lang.RuntimeException:
> > org.apache.solr.handler.dataimport.DataImportHandlerException: Could
> > not load driver: com.mysql.jdbc.Driver Processing Document # 1
>

Re: not able to import Data through DIH solr 4.2.1

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
> Could not load driver: com.mysql.jdbc.Driver

Looks like a custom driver. Is the driver name correct? Is the library
declared in solrconfig.xml? Is the library path correct (use absolute
path if in doubt).

Regards,
   Alex.

----
Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
http://www.solr-start.com/


On 19 March 2015 at 00:35, abhishek tiwari <te...@gmail.com> wrote:
> Please provide the basic steps to resolve the issue
>
>
> Getting following error
>
> Full Import failed:java.lang.RuntimeException:
> java.lang.RuntimeException:
> org.apache.solr.handler.dataimport.DataImportHandlerException: Could
> not load driver: com.mysql.jdbc.Driver Processing Document # 1