I meet a error when i write a plugin for add new presto plugin

121 views
Skip to first unread message

mycla...@gmail.com

unread,
Nov 23, 2016, 3:23:10 AM11/23/16
to Presto
I meet a error when i write a plugin for add new presto plugin


@ScalarFunction("json_array_extract")
@Description("extract json array value by given jsonPath.")
@SqlType("array(varchar)")
public static Block jsonArrayExtract(@SqlType(StandardTypes.VARCHAR) Slice json, @SqlType(JsonPathType.NAME) JsonPath jsonPath) {
Long length = JsonFunctions.jsonArrayLength(j

code at github : https://github.com/hawkingrei/presto-third-functions/blob/master/src/main/java/cc/shanruifeng/functions/udfs/scalar/json/JsonArrayExtractFunction.java


ERROR main com.facebook.presto.server.PrestoServer com/facebook/presto/operator/scalar/JsonPath
java.lang.NoClassDefFoundError: com/facebook/presto/operator/scalar/JsonPath
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at com.facebook.presto.operator.scalar.annotations.ScalarFromAnnotationsParser.findPublicMethodsWithAnnotation(ScalarFromAnnotationsParser.java:163)
at com.facebook.presto.operator.scalar.annotations.ScalarFromAnnotationsParser.findScalarsInFunctionSetClass(ScalarFromAnnotationsParser.java:88)
at com.facebook.presto.operator.scalar.annotations.ScalarFromAnnotationsParser.parseFunctionDefinitions(ScalarFromAnnotationsParser.java:60)
at com.facebook.presto.metadata.FunctionExtractor.extractFunctions(FunctionExtractor.java:57)
at com.facebook.presto.server.PluginManager.installPlugin(PluginManager.java:203)
at com.facebook.presto.server.PluginManager.loadPlugin(PluginManager.java:175)
at com.facebook.presto.server.PluginManager.loadPlugin(PluginManager.java:158)
at com.facebook.presto.server.PluginManager.loadPlugins(PluginManager.java:139)
at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:118)
at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:67)
Caused by: java.lang.ClassNotFoundException: com.facebook.presto.operator.scalar.JsonPath
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at com.facebook.presto.server.PluginClassLoader.loadClass(PluginClassLoader.java:76)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 13 more


can you help me ? thank you very much

David Phillips

unread,
Dec 12, 2016, 12:08:59 PM12/12/16
to presto...@googlegroups.com
Sorry for the late reply. I'll respond on the issue you filed: https://github.com/prestodb/presto/issues/6693


--
You received this message because you are subscribed to the Google Groups "Presto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to presto-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

tx08...@gmail.com

unread,
May 8, 2017, 1:02:56 AM5/8/17
to Presto, mycla...@gmail.com
I encountered the same problem,did you solve the problem?

Reply all
Reply to author
Forward
0 new messages