You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Xu Zhang (JIRA)" <ji...@apache.org> on 2008/04/03 23:45:24 UTC

[jira] Updated: (PIG-183) Pig could not resolve my udf class

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

Xu Zhang updated PIG-183:
-------------------------

    Attachment: testudf.jar

> Pig could not resolve my udf class
> ----------------------------------
>
>                 Key: PIG-183
>                 URL: https://issues.apache.org/jira/browse/PIG-183
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Xu Zhang
>         Attachments: testudf.jar
>
>
> When I ran the following Pig script with the latest Pig stuff, I got an exception for unresolved class. I noticed that org.apache.pig.test.udf.storefunc is not among the packages that Pig searches ([, org.apache.pig.builtin., com.yahoo.pig.yst.sds.ULT., org.apache.pig.impl.builtin.]). 
> I am sure that the package path for StringStore (org.apache.pig.test.udf.storefunc) is correct in testudf.jar.  I attached testudf.jar here with this bug report. 
> {code}
> register /path/to/my/jar/testudf.jar;
> A = load '/user/pig/tests/data/singlefile/textdoc' using org.apache.pig.test.udf.storefunc.StringStore();
> store A into 'results_4_1';
> {code}
> {noformat}
> 2008-04-03 13:20:25,154 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: wilbur11.labs.corp.sp1.yahoo.com:8020
> 2008-04-03 13:20:25,781 [main] ERROR org.apache.pig.tools.grunt.Grunt - java.lang.RuntimeException: could not instantiate 'org.apache.pig.test.udf.storefunc.StringStore' with arguments '[]'
>         at org.apache.pig.impl.PigContext.instantiateFunc(PigContext.java:504)
>         at org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:510)
>         at org.apache.pig.impl.io.ValidatingInputFileSpec.getSlicer(ValidatingInputFileSpec.java:50)
>         at org.apache.pig.impl.io.ValidatingInputFileSpec.validate(ValidatingInputFileSpec.java:42)
>         at org.apache.pig.impl.io.ValidatingInputFileSpec.<init>(ValidatingInputFileSpec.java:37)
>         at org.apache.pig.impl.logicalLayer.parser.QueryParser.LoadClause(QueryParser.java:795)
>         at org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseExpr(QueryParser.java:628)
>         at org.apache.pig.impl.logicalLayer.parser.QueryParser.Expr(QueryParser.java:484)
>         at org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:334)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:47)
>         at org.apache.pig.PigServer.registerQuery(PigServer.java:262)
>         at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:446)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:226)
>         at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:62)
>         at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:60)
>         at org.apache.pig.Main.main(Main.java:265)
> Caused by: java.io.IOException: Could not resolve org.apache.pig.test.udf.storefunc.StringStore using imports: [, org.apache.pig.builtin., com.yahoo.pig.yst.sds.ULT., org.apache.pig.impl.builtin.]
>         at org.apache.pig.impl.util.WrappedIOException.wrap(WrappedIOException.java:16)
>         at org.apache.pig.impl.PigContext.resolveClassName(PigContext.java:456)
>         at org.apache.pig.impl.PigContext.instantiateFunc(PigContext.java:486)
>         ... 15 more
> Caused by: java.lang.ClassNotFoundException: Could not resolve org.apache.pig.test.udf.storefunc.StringStore using imports: [, org.apache.pig.builtin., com.yahoo.pig.yst.sds.ULT., org.apache.pig.impl.builtin.]
>         at org.apache.pig.impl.PigContext.resolveClassName(PigContext.java:455)
>         ... 16 more
> 2008-04-03 13:20:25,784 [main] ERROR org.apache.pig.tools.grunt.Grunt - could not instantiate 'org.apache.pig.test.udf.storefunc.StringStore' with arguments '[]'
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.