Can you put first few lines of your code here or upload code on github and
share the link?




On Wed, Apr 9, 2014 at 11:59 AM, Rishabh Bhardwaj <rbnex...@yahoo.com>wrote:

> Hi all,
> I have done the following steps to create a UDF in hive but getting
> error.Please help me.
> 1. Created the udf as described 
> here<http://blog.matthewrathbone.com/2013/08/10/guide-to-writing-hive-udfs.html>
> .
> 2. Compiled it successfully.
> 3. Copy the class file to a directory hiveudfs.
> 4. Added it to a jar with this command: jar -cf hiveudfs.jar
> hiveudfs/SimpleUDFExample.class
> 5. Import the jar into hive. add jar hiveudfs.jar;  (Added Successfully)
> create temporary function helloworld as 'hiveudfs.SimpleUDFExample';
> At this I am getting the following error,
> hive> create temporary function helloworld as 'hiveudfs.SimpleUDFExample';
> java.lang.NoClassDefFoundError: hiveudfs/SimpleUDFExample (wrong name:
> SimpleUDFExample)
>     at java.lang.ClassLoader.defineClass1(Native Method)
>     at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
>     at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>     at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
>     at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
>     at java.lang.Class.forName0(Native Method)
>     at java.lang.Class.forName(Class.java:266)
>     at
> org.apache.hadoop.hive.ql.exec.FunctionTask.getUdfClass(FunctionTask.java:105)
>     at
> org.apache.hadoop.hive.ql.exec.FunctionTask.createFunction(FunctionTask.java:75)
>     at
> org.apache.hadoop.hive.ql.exec.FunctionTask.execute(FunctionTask.java:63)
>     at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:138)
>     at
> org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
>     at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1353)
>     at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1137)
>     at org.apache.hadoop.hive.ql.Driver.run(Driver.java:945)
>     at org.apache.hadoop.hive.ql.Driver.run(Driver.java:867)
>     at
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
>     at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
>     at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:412)
>     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:755)
>     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:613)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:601)
>     at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
> FAILED: Execution Error, return code -101 from
> org.apache.hadoop.hive.ql.exec.FunctionTask
> Thanks,
> Rishabh.
>



-- 
Nitin Pawar

Reply via email to