[
https://issues.apache.org/jira/browse/CAMEL-12028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16264429#comment-16264429
]
ASF GitHub Bot commented on CAMEL-12028:
----------------------------------------
oscerd closed pull request #2111: [CAMEL-12028] Flink requires internals to be
visible by TCCL
URL: https://github.com/apache/camel/pull/2111
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/components/camel-flink/src/main/java/org/apache/camel/component/flink/DataSetFlinkProducer.java
b/components/camel-flink/src/main/java/org/apache/camel/component/flink/DataSetFlinkProducer.java
index 054180dd1d9..e3051579256 100644
---
a/components/camel-flink/src/main/java/org/apache/camel/component/flink/DataSetFlinkProducer.java
+++
b/components/camel-flink/src/main/java/org/apache/camel/component/flink/DataSetFlinkProducer.java
@@ -35,13 +35,21 @@ public void process(Exchange exchange) throws Exception {
Object body = exchange.getIn().getBody();
Object result;
- if (body instanceof List) {
- List list = (List) body;
- Object[] array = list.toArray(new Object[list.size()]);
- result = dataSetCallback.onDataSet(ds, array);
- } else {
- result = dataSetCallback.onDataSet(ds, body);
+
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+
Thread.currentThread().setContextClassLoader(DataSet.class.getClassLoader());
+ if (body instanceof List) {
+ List list = (List) body;
+ Object[] array = list.toArray(new Object[list.size()]);
+ result = dataSetCallback.onDataSet(ds, array);
+ } else {
+ result = dataSetCallback.onDataSet(ds, body);
+ }
+ } finally {
+ Thread.currentThread().setContextClassLoader(tccl);
}
+
collectResults(exchange, result);
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Flink requires internals to be visible by TCCL
> ----------------------------------------------
>
> Key: CAMEL-12028
> URL: https://issues.apache.org/jira/browse/CAMEL-12028
> Project: Camel
> Issue Type: Bug
> Components: camel-flink
> Reporter: Thomas Diesler
> Assignee: Thomas Diesler
> Fix For: 2.20.2, 2.21.0
>
>
> CrossRef: https://github.com/wildfly-extras/wildfly-camel/issues/2318
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)