You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Yibing Shi (JIRA)" <ji...@apache.org> on 2015/09/04 09:10:45 UTC

[jira] [Updated] (HIVE-11733) UDF GenericUDFReflect cannot find classes added by "ADD JAR"

     [ https://issues.apache.org/jira/browse/HIVE-11733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yibing Shi updated HIVE-11733:
------------------------------
    Attachment: HIVE-11733.1.patch

Upload the patch.

> UDF GenericUDFReflect cannot find classes added by "ADD JAR"
> ------------------------------------------------------------
>
>                 Key: HIVE-11733
>                 URL: https://issues.apache.org/jira/browse/HIVE-11733
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 1.2.1
>            Reporter: Yibing Shi
>            Assignee: Yibing Shi
>         Attachments: HIVE-11733.1.patch
>
>
> When run below command:
> {quote}
> hive -e "add jar /root/hive/TestReflect.jar; \
> select reflect('com.yshi.hive.TestReflect', 'testReflect', code) from sample_07 limit 3"
> {quote}
> Get below error:
> {noformat}
> Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: UDFReflect evaluate
> {noformat}
> The full stack trace is:
> {noformat}
> 15/09/04 07:00:37 [main]: INFO compress.CodecPool: Got brand-new decompressor [.bz2]
> Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: UDFReflect evaluate
> 15/09/04 07:00:37 [main]: ERROR CliDriver: Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: UDFReflect evaluate
> java.io.IOException: org.apache.hadoop.hive.ql.metadata.HiveException: UDFReflect evaluate
> 	at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:152)
> 	at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:1657)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:227)
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:159)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:370)
> 	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:756)
> 	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
> 	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)
> 	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:606)
> 	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: UDFReflect evaluate
> 	at org.apache.hadoop.hive.ql.udf.generic.GenericUDFReflect.evaluate(GenericUDFReflect.java:107)
> 	at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator._evaluate(ExprNodeGenericFuncEvaluator.java:185)
> 	at org.apache.hadoop.hive.ql.exec.ExprNodeEvaluator.evaluate(ExprNodeEvaluator.java:77)
> 	at org.apache.hadoop.hive.ql.exec.ExprNodeEvaluator.evaluate(ExprNodeEvaluator.java:65)
> 	at org.apache.hadoop.hive.ql.exec.SelectOperator.processOp(SelectOperator.java:77)
> 	at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:815)
> 	at org.apache.hadoop.hive.ql.exec.TableScanOperator.processOp(TableScanOperator.java:95)
> 	at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:424)
> 	at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:416)
> 	at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:138)
> 	... 13 more
> Caused by: java.lang.ClassNotFoundException: com.yshi.hive.TestReflect
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> 	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:425)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(Class.java:190)
> 	at org.apache.hadoop.hive.ql.udf.generic.GenericUDFReflect.evaluate(GenericUDFReflect.java:105)
> 	... 22 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)