You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After importing 4.9.8 into the maven project, there is no problem when running locally, but jar package conflicts will occur when running on the flink1.18.1 cluster.
The flink-dist-1.18.1.jar and flink-shaded-hadoop-2-uber-2.8.3-10.0.jar that come with the flink1.18.1 environment both have okhttp dependencies that conflict with web3j.
Steps To Reproduce
Confirmed that there is okhttp in my jar package /opt/flink/lib# jar -tf ./runner-1.0-SNAPSHOT.jar | grep TaskRunner okhttp3/internal/concurrent/TaskRunner.class okhttp3/internal/concurrent/TaskRunner$Companion.class okhttp3/internal/concurrent/TaskRunner$RealBackend.class okhttp3/internal/concurrent/TaskRunner$Backend.class okhttp3/internal/concurrent/TaskRunner$runnable$1.class
The flink-dist-1.18.1.jar and flink-shaded-hadoop-2-uber-2.8.3-10.0.jar that come with the flink1.18.1 environment both have okhttp dependencies that conflict with web3j.
Expected behavior
A clear and concise description of what you expected to happen.
Actual behavior
A description of the actual behavior occurring.
Environment
Describe the environment in which the issue occurs
Jar Package Conflicts
After importing 4.9.8 into the maven project, there is no problem when running locally, but jar package conflicts will occur when running on the flink1.18.1 cluster.
The flink-dist-1.18.1.jar and flink-shaded-hadoop-2-uber-2.8.3-10.0.jar that come with the flink1.18.1 environment both have okhttp dependencies that conflict with web3j.
Steps To Reproduce
/opt/flink/lib# jar -tf ./runner-1.0-SNAPSHOT.jar | grep TaskRunner okhttp3/internal/concurrent/TaskRunner.class okhttp3/internal/concurrent/TaskRunner$Companion.class okhttp3/internal/concurrent/TaskRunner$RealBackend.class okhttp3/internal/concurrent/TaskRunner$Backend.class okhttp3/internal/concurrent/TaskRunner$runnable$1.class
Expected behavior
A clear and concise description of what you expected to happen.
Actual behavior
A description of the actual behavior occurring.
Environment
Describe the environment in which the issue occurs
Web3j version
4.9.8
Java or Android version
8
Operating System
flink 1.18.1
pom.xml
`
4.0.0
manuscript
runner
1.0-SNAPSHOT
jar
Flink Quickstart Job
UTF-8 1.18.1 1.8 2.12Additional context
Add any other context about the problem here.
manuscript-flink-demo-jobmanager-1 | 2024-11-28 03:05:08,379 INFO org.apache.flink.runtime.executiongraph.ExecutionGraph [] - Source: contracts[1] -> Calc[2] -> ConstraintEnforcer[3] -> Sink: ethereum_token_metas_sink_pg[3] (1/1) (9c94fbfc8db48f0a661b2d258924233e_cbc357ccb763df2852fee8c4fc7d55f2_0_187) switched from RUNNING to FAILED on 172.19.0.4:40833-265326 @ manuscript-flink-demo-taskmanager-1.manuscript-flink-demo_ms_network (dataPort=39335). manuscript-flink-demo-jobmanager-1 | java.lang.NoClassDefFoundError: Could not initialize class okhttp3.internal.concurrent.TaskRunner manuscript-flink-demo-jobmanager-1 | at okhttp3.ConnectionPool.<init>(ConnectionPool.kt:41) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at okhttp3.ConnectionPool.<init>(ConnectionPool.kt:47) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at okhttp3.OkHttpClient$Builder.<init>(OkHttpClient.kt:471) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at org.web3j.protocol.http.HttpService.getOkHttpClientBuilder(HttpService.java:132) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at org.web3j.protocol.http.HttpService.createOkHttpClient(HttpService.java:139) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at org.web3j.protocol.http.HttpService.<init>(HttpService.java:112) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.evm.Web3jClient.<init>(Web3jClient.java:155) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.evm.Web3jClient.<init>(Web3jClient.java:146) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at java.util.HashMap.computeIfAbsent(Unknown Source) ~[?:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.getWeb3jClientInstance(GetTokenMeta.java:30) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.invoke(GetTokenMeta.java:58) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.lambda$eval$0(GetTokenMeta.java:45) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache.lambda$computeIfAbsent$0(LocalCache.java:4204) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache$LoadingValueReference.compute(LocalCache.java:3566) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache$Segment.compute(LocalCache.java:2242) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache.compute(LocalCache.java:4197) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache.computeIfAbsent(LocalCache.java:4204) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.chainbase.common.cached.LRUCache.computeIfAbsent(LRUCache.java:22) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.eval(GetTokenMeta.java:43) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.eval(GetTokenMeta.java:54) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at StreamExecCalc$66.processElement_split1(Unknown Source) ~[?:?] manuscript-flink-demo-jobmanager-1 | at StreamExecCalc$66.processElement(Unknown Source) ~[?:?] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:75) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:50) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:29) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.SourceOperatorStreamTask$AsyncDataOutputToOutput.emitRecord(SourceOperatorStreamTask.java:309) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.api.operators.source.SourceOutputWithWatermarks.collect(SourceOutputWithWatermarks.java:110) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.paimon.flink.source.FlinkRecordsWithSplitIds.emitRecord(FlinkRecordsWithSplitIds.java:118) ~[paimon-flink-1.18-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at org.apache.paimon.flink.source.FileStoreSourceReader.lambda$new$1(FileStoreSourceReader.java:60) ~[paimon-flink-1.18-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.connector.base.source.reader.SourceReaderBase.pollNext(SourceReaderBase.java:160) ~[flink-connector-files-1.18.0.jar:1.18.0] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.api.operators.SourceOperator.emitNext(SourceOperator.java:419) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.io.StreamTaskSourceInput.emitNext(StreamTaskSourceInput.java:68) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.io.StreamOneInputProcessor.processInput(StreamOneInputProcessor.java:65) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.StreamTask.processInput(StreamTask.java:562) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:231) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:858) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:807) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:953) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:932) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:746) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.runtime.taskmanager.Task.run(Task.java:562) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at java.lang.Thread.run(Unknown Source) ~[?:?]
manuscript-flink-demo-jobmanager-1 | java.lang.NoSuchFieldError: Companion manuscript-flink-demo-jobmanager-1 | at okhttp3.internal.Util.<clinit>(Util.kt:72) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at okhttp3.internal.concurrent.TaskRunner.<clinit>(TaskRunner.kt:309) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at okhttp3.ConnectionPool.<init>(ConnectionPool.kt:41) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at okhttp3.ConnectionPool.<init>(ConnectionPool.kt:47) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at okhttp3.OkHttpClient$Builder.<init>(OkHttpClient.kt:471) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at org.web3j.protocol.http.HttpService.getOkHttpClientBuilder(HttpService.java:132) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at org.web3j.protocol.http.HttpService.createOkHttpClient(HttpService.java:139) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at org.web3j.protocol.http.HttpService.<init>(HttpService.java:112) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.evm.Web3jClient.<init>(Web3jClient.java:155) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.evm.Web3jClient.<init>(Web3jClient.java:146) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at java.util.HashMap.computeIfAbsent(Unknown Source) ~[?:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.getWeb3jClientInstance(GetTokenMeta.java:30) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.invoke(GetTokenMeta.java:58) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.lambda$eval$0(GetTokenMeta.java:45) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache.lambda$computeIfAbsent$0(LocalCache.java:4204) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache$LoadingValueReference.compute(LocalCache.java:3566) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache$Segment.compute(LocalCache.java:2242) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache.compute(LocalCache.java:4197) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache.computeIfAbsent(LocalCache.java:4204) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.chainbase.common.cached.LRUCache.computeIfAbsent(LRUCache.java:22) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.eval(GetTokenMeta.java:43) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.eval(GetTokenMeta.java:54) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at StreamExecCalc$66.processElement_split1(Unknown Source) ~[?:?] manuscript-flink-demo-jobmanager-1 | at StreamExecCalc$66.processElement(Unknown Source) ~[?:?] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:75) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:50) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:29) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.SourceOperatorStreamTask$AsyncDataOutputToOutput.emitRecord(SourceOperatorStreamTask.java:309) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.api.operators.source.SourceOutputWithWatermarks.collect(SourceOutputWithWatermarks.java:110) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.paimon.flink.source.FlinkRecordsWithSplitIds.emitRecord(FlinkRecordsWithSplitIds.java:118) ~[paimon-flink-1.18-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at org.apache.paimon.flink.source.FileStoreSourceReader.lambda$new$1(FileStoreSourceReader.java:60) ~[paimon-flink-1.18-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.connector.base.source.reader.SourceReaderBase.pollNext(SourceReaderBase.java:160) ~[flink-connector-files-1.18.0.jar:1.18.0] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.api.operators.SourceOperator.emitNext(SourceOperator.java:419) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.io.StreamTaskSourceInput.emitNext(StreamTaskSourceInput.java:68) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.io.StreamOneInputProcessor.processInput(StreamOneInputProcessor.java:65) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.StreamTask.processInput(StreamTask.java:562) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:231) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:858) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:807) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:953) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:932) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:746) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at org.apache.flink.runtime.taskmanager.Task.run(Task.java:562) ~[flink-dist-1.18.1.jar:1.18.1] manuscript-flink-demo-jobmanager-1 | at java.lang.Thread.run(Unknown Source) ~[?:?]
2024-11-28 08:50:42,133 INFO org.apache.flink.runtime.executiongraph.ExecutionGraph [] - Source: contracts[1] -> Calc[2] -> ConstraintEnforcer[3] -> Sink: ethereum_token_metas_sink_pg[3] (1/1) (f294f1a87fa6a8fa42659f342ae89855_cbc357ccb763df2852fee8c4fc7d55f2_0_26) switched from RUNNING to FAILED on 172.25.0.4:35975-ddb6a4 @ manuscript-flink-demo-taskmanager-1.manuscript-flink-demo_ms_network (dataPort=43741). manuscript-flink-demo-jobmanager-1 | java.lang.NoClassDefFoundError: okhttp3/Interceptor manuscript-flink-demo-jobmanager-1 | at com.chainbase.evm.Web3jClient.<init>(Web3jClient.java:155) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.evm.Web3jClient.<init>(Web3jClient.java:146) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at java.util.HashMap.computeIfAbsent(Unknown Source) ~[?:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.getWeb3jClientInstance(GetTokenMeta.java:30) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.invoke(GetTokenMeta.java:58) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.lambda$eval$0(GetTokenMeta.java:45) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache.lambda$computeIfAbsent$0(LocalCache.java:4204) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache$LoadingValueReference.compute(LocalCache.java:3566) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache$Segment.compute(LocalCache.java:2242) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache.compute(LocalCache.java:4197) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.google.common.cache.LocalCache.computeIfAbsent(LocalCache.java:4204) ~[paimon-oss-impl-0.8.1.jar:0.8.1] manuscript-flink-demo-jobmanager-1 | at com.chainbase.common.cached.LRUCache.computeIfAbsent(LRUCache.java:22) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.eval(GetTokenMeta.java:43) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at com.chainbase.udf.GetTokenMeta.eval(GetTokenMeta.java:54) ~[runner-1.0-SNAPSHOT.jar:?] manuscript-flink-demo-jobmanager-1 | at StreamExecCalc$66.processElement_split1(Unknown Source) ~[?:?] manuscript-flink-demo-jobmanager-1 | at StreamExecCalc$66.processElement(Unknown Source) ~[?:?]
The text was updated successfully, but these errors were encountered: