You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Abhishek Tiwari <ab...@gmail.com> on 2009/07/16 17:09:38 UTC

Using external Jars in UDF

Hi,

I am writing an UDF which can 'select' required rows/records from a
hive-table and dump it into my mysql database over jdbc.

However, I am not being able to get mysql-connector jar into the classpath
and am receiving the error: java.lang.ClassNotFoundException:
com.mysql.jdbc.Driver

Can anyone tell where I can place mysql-connector and specify its path, so
that it can work?

Thanks in advance.

Regards,
Abhishek

Re: Using external Jars in UDF

Posted by Abhishek Tiwari <ab...@gmail.com>.
Hi guys,

Sorry about the repeated question!

I got my reply in solution to Edward Capriolo's question
http://mail-archives.apache.org/mod_mbox/hadoop-hive-user/200907.mbox/browser

Solution: add jar <my-connector> ... worked like charm!

Thanks,
Abhishek

On Thu, Jul 16, 2009 at 8:39 PM, Abhishek Tiwari <
abhishektiwari.btech@gmail.com> wrote:

> Hi,
>
> I am writing an UDF which can 'select' required rows/records from a
> hive-table and dump it into my mysql database over jdbc.
>
> However, I am not being able to get mysql-connector jar into the classpath
> and am receiving the error: java.lang.ClassNotFoundException:
> com.mysql.jdbc.Driver
>
> Can anyone tell where I can place mysql-connector and specify its path, so
> that it can work?
>
> Thanks in advance.
>
> Regards,
> Abhishek
>
>

Re: Using external Jars in UDF

Posted by Abhishek Tiwari <ab...@gmail.com>.
Yeah! :)

Sounds cool, lets get this done!

On Thu, Jul 16, 2009 at 9:34 PM, Edward Capriolo <ed...@gmail.com>wrote:

> You and I must be reading each others mind!
>
> https://issues.apache.org/jira/browse/HIVE-645
>
> Do you want to join forces on this one?
>
> Edward
> On Thu, Jul 16, 2009 at 11:43 AM, Abhishek
> Tiwari<ab...@gmail.com> wrote:
> >
> > I sort of guessed that and tried it as well... but it did not help me.
> >
> > However using  .. add jar .. at cli helped!
> >
> >
> > On Thu, Jul 16, 2009 at 9:10 PM, Prasad Chakka <pc...@facebook.com>
> wrote:
> >>
> >> You can put the jar in hive/lib
> >>
> >>
> >> ________________________________
> >> From: Abhishek Tiwari <ab...@gmail.com>
> >> Reply-To: <hi...@hadoop.apache.org>
> >> Date: Thu, 16 Jul 2009 08:09:38 -0700
> >> To: <hi...@hadoop.apache.org>
> >> Subject: Using external Jars in UDF
> >>
> >> Hi,
> >>
> >> I am writing an UDF which can 'select' required rows/records from a
> >> hive-table and dump it into my mysql database over jdbc.
> >>
> >> However, I am not being able to get mysql-connector jar into the
> classpath
> >> and am receiving the error: java.lang.ClassNotFoundException:
> >> com.mysql.jdbc.Driver
> >>
> >> Can anyone tell where I can place mysql-connector and specify its path,
> so
> >> that it can work?
> >>
> >> Thanks in advance.
> >>
> >> Regards,
> >> Abhishek
> >>
> >>
> >
> >
>

Re: Using external Jars in UDF

Posted by Edward Capriolo <ed...@gmail.com>.
You and I must be reading each others mind!

https://issues.apache.org/jira/browse/HIVE-645

Do you want to join forces on this one?

Edward
On Thu, Jul 16, 2009 at 11:43 AM, Abhishek
Tiwari<ab...@gmail.com> wrote:
>
> I sort of guessed that and tried it as well... but it did not help me.
>
> However usingĀ  .. add jar .. at cli helped!
>
>
> On Thu, Jul 16, 2009 at 9:10 PM, Prasad Chakka <pc...@facebook.com> wrote:
>>
>> You can put the jar in hive/lib
>>
>>
>> ________________________________
>> From: Abhishek Tiwari <ab...@gmail.com>
>> Reply-To: <hi...@hadoop.apache.org>
>> Date: Thu, 16 Jul 2009 08:09:38 -0700
>> To: <hi...@hadoop.apache.org>
>> Subject: Using external Jars in UDF
>>
>> Hi,
>>
>> I am writing an UDF which can 'select' required rows/records from a
>> hive-table and dump it into my mysql database over jdbc.
>>
>> However, I am not being able to get mysql-connector jar into the classpath
>> and am receiving the error: java.lang.ClassNotFoundException:
>> com.mysql.jdbc.Driver
>>
>> Can anyone tell where I can place mysql-connector and specify its path, so
>> that it can work?
>>
>> Thanks in advance.
>>
>> Regards,
>> Abhishek
>>
>>
>
>

Re: Using external Jars in UDF

Posted by Abhishek Tiwari <ab...@gmail.com>.
I sort of guessed that and tried it as well... but it did not help me.

However using  .. add jar .. at cli helped!


On Thu, Jul 16, 2009 at 9:10 PM, Prasad Chakka <pc...@facebook.com> wrote:

>  You can put the jar in hive/lib
>
>
> ------------------------------
> *From: *Abhishek Tiwari <ab...@gmail.com>
> *Reply-To: *<hi...@hadoop.apache.org>
> *Date: *Thu, 16 Jul 2009 08:09:38 -0700
> *To: *<hi...@hadoop.apache.org>
> *Subject: *Using external Jars in UDF
>
>
> Hi,
>
> I am writing an UDF which can 'select' required rows/records from a
> hive-table and dump it into my mysql database over jdbc.
>
> However, I am not being able to get mysql-connector jar into the classpath
> and am receiving the error: java.lang.ClassNotFoundException:
> com.mysql.jdbc.Driver
>
> Can anyone tell where I can place mysql-connector and specify its path, so
> that it can work?
>
> Thanks in advance.
>
> Regards,
> Abhishek
>
>
>

Re: Using external Jars in UDF

Posted by Prasad Chakka <pc...@facebook.com>.
You can put the jar in hive/lib


________________________________
From: Abhishek Tiwari <ab...@gmail.com>
Reply-To: <hi...@hadoop.apache.org>
Date: Thu, 16 Jul 2009 08:09:38 -0700
To: <hi...@hadoop.apache.org>
Subject: Using external Jars in UDF

Hi,

I am writing an UDF which can 'select' required rows/records from a hive-table and dump it into my mysql database over jdbc.

However, I am not being able to get mysql-connector jar into the classpath and am receiving the error: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

Can anyone tell where I can place mysql-connector and specify its path, so that it can work?

Thanks in advance.

Regards,
Abhishek