Caused by: java.lang.NoClassDefFoundError: Could not initialize class okhttp3.OkHttpClient
Open
quchunhui
opened this issue 5 years ago
•
3 comments
==Usage scenario==
Flink sink to influxDB.
The code runs locally without problem, and after being submitted to the cluster, receives the following error.
Operating system: Centos8,
Flink version: 1.10.0,
Hadoop version: 2.8.3
InfluxDB version: 1.7.1
==error log==
Caused by: java.lang.NoClassDefFoundError: Could not initialize class okhttp3.OkHttpClient
at okhttp3.OkHttpClient$Builder.(OkHttpClient.java:449)
at com.rexel.stream.utils.InfluxUtils.connect(InfluxUtils.java:57)
at com.rexel.stream.flink.sink.SinkToInflux.open(SinkToInflux.java:38)
at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:36)
at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:102)
at org.apache.flink.streaming.api.operators.StreamSink.open(StreamSink.java:48)
at org.apache.flink.streaming.runtime.tasks.StreamTask.initializeStateAndOpen(StreamTask.java:1007)
at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$beforeInvoke$0(StreamTask.java:454)
at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$SynchronizedStreamTaskActionExecutor.runThrowing(StreamTaskActionExecutor.java:94)
at org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:449)
at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:461)
at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:707)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:532)
at java.lang.Thread.run(Thread.java:748)
Thanks for opening this issue. We’re closing it as part of a cleanup of older open issues.
If it’s still relevant, please leave a comment here so we can reopen it. For a bug, please include the versions of influxdb-java and InfluxDB you’re using, along with a minimal example that shows the expected and actual behavior. For a feature request or question, please share your current use case and what you still need.