是否可以编写一个调用Java编写的SOAP Web服务的Pig UDF?我在下面运行Pig代码时出现语法错误。 UDF调用Soap Web服务客户端。
Pig Script:
register CalculatorWS_Client_Application.jar;
A = LOAD 'student_data.txt' AS (name: chararray, age: int, gpa: float);
B = FOREACH A GENERATE calculatorws_client_application.CalculateUDF(name);
Dump B;
错误:
Failed to parse: Pig script failed to parse: <file script.pig, line 3, column 23> Failed to generate logical plan. Nested exception: org.apache.pig.backend.executionengine.ExecException: ERROR 1069: Problem resolving class version numbers for class calculatorws_client_application.CalculateUDF ....
Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 1069: Problem resolving class version numbers for class calculatorws_client_application.CalculateUDF ...
Caused by: java.lang.UnsupportedClassVersionError: calculatorws_client_application/CalculateUDF : Unsupported major.minor version 52.0
2014-11-19 18:41:37,075 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1069: Problem resolving class version numbers for class calculatorws_client_application.CalculateUDF
答案 0 :(得分:0)
看起来像java版本不匹配 在控制台上键入java -version并查看它打印的版本。 您还可以使用sudo update-alternatives --config java并设置所需的版本。