When invoking a Java UDF, Jaql relies on the JVM to check parameter types.
However, the error reporting is too limited to easily track the problem down.
It should at least report the Java UDF class name, the parameter that failed,
and the expected parameter type, and the given argument type. Moreover, jaql
should do more compile time checking with the schema.
Here's an example of what is currently returned:
java.lang.reflect.UndeclaredThrowableException
at com.ibm.jaql.lang.expr.hadoop.MapReduceBaseExpr$MapEval.run(MapReduceBaseExpr.java:440)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:358)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)
at org.apache.hadoop.mapred.Child.main(Child.java:170)
Caused by: java.lang.reflect.UndeclaredThrowableException
at com.ibm.jaql.json.util.JsonIterator.hasNext(JsonIterator.java:147)
at com.ibm.jaql.lang.expr.hadoop.MapReduceBaseExpr$MapEval.run(MapReduceBaseExpr.java:416)
... 3 more
Caused by: java.lang.IllegalArgumentException:
java.lang.ClassCastException@1f411f41
at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at com.ibm.jaql.lang.expr.function.JavaFunctionCallExpr.makeCall(JavaFunctionCallExpr.java:264)
at com.ibm.jaql.lang.expr.function.JavaFunctionCallExpr.eval(JavaFunctionCallExpr.java:276)
Original issue reported on code.google.com by Kevin.Be...@gmail.com on 9 Jun 2010 at 12:46
Original issue reported on code.google.com by
Kevin.Be...@gmail.com
on 9 Jun 2010 at 12:46