wuyang created FLINK-23567: ------------------------------ Summary: Hive 1.1.0 failed to write using flink sql 1.3.1 because the JSON class was not found Key: FLINK-23567 URL: https://issues.apache.org/jira/browse/FLINK-23567 Project: Flink Issue Type: Bug Components: Connectors / Hive Affects Versions: 1.13.1 Reporter: wuyang Fix For: 1.13.1 Attachments: image-2021-07-31-10-39-52-126.png
*First:I added the flink-sql-connector-hive-3.1.2 under the Lib directory, the following error is prompted when publishing the task of Flink SQL:* java.lang.NoClassDefFoundError: org/json/JSONException at org.apache.flink.table.planner.delegation.hive.parse.HiveParserDDLSemanticAnalyzer.analyzeCreateTable(HiveParserDDLSemanticAnalyzer.java:646) at org.apache.flink.table.planner.delegation.hive.parse.HiveParserDDLSemanticAnalyzer.analyzeInternal(HiveParserDDLSemanticAnalyzer.java:373) at org.apache.flink.table.planner.delegation.hive.HiveParser.processCmd(HiveParser.java:235) at org.apache.flink.table.planner.delegation.hive.HiveParser.parse(HiveParser.java:217) at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeSql(TableEnvironmentImpl.java:724) at me.ddmc.bigdata.sqlsubmit.helper.SqlSubmitHelper.callSql(SqlSubmitHelper.java:201) at me.ddmc.bigdata.sqlsubmit.helper.SqlSubmitHelper.callCommand(SqlSubmitHelper.java:182) at me.ddmc.bigdata.sqlsubmit.helper.SqlSubmitHelper.run(SqlSubmitHelper.java:124) at me.ddmc.bigdata.sqlsubmit.SqlSubmit.main(SqlSubmit.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355) at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:222) at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114) at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:812) at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:246) at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1054) at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1132) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1754) at org.apache.flink.runtime.security.contexts.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41) at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1132) Caused by: java.lang.ClassNotFoundException: org.json.JSONException at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ... 25 *Second: After investigation, it is found that the exclude is added to the POM in the flink-sql-connector-hive-1.2.2 module, but other hive connectors are not.* !image-2021-07-31-10-37-21-813.png! *But I didn't understand this remark. Is this a problem?* -- This message was sent by Atlassian Jira (v8.3.4#803005)