[ 
https://issues.apache.org/jira/browse/FLINK-19968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17250656#comment-17250656
 ] 

Ben La Monica edited comment on FLINK-19968 at 12/16/20, 11:38 PM:
-------------------------------------------------------------------

I had this problem as well with a shaded jar, and it's because there are files 
in the 
META-INF/services/org.apache.flink.core.execution.PipelineExecutorFactory file 
in multiple jars. This causes the file to be overwritten, and if you are 
unlucky (like I was) it will overwrite it with a blank file or with a pipeline 
executor factory that doesn't support your deployment type.

I added this to my maven-shade plugin to solve the problem:
{code:java}
<transformer 
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
    
<resource>META-INF/services/org.apache.flink.core.execution.PipelineExecutorFactory</resource>
</transformer>
{code}


was (Author: mstar_benl):
I had this problem as well with a shaded jar, and it's because there are files 
in the 
META-INF/services/org.apache.flink.core.execution.PipelineExecutorFactory file 
in multiple jars. This causes the file to be overwritten, and if you are 
unlucky (like I was) it will overwrite it with a blank file or with a pipeline 
executor factory that doesn't support your deployment type.

I added this to my maven-shade plugin to solve the problem:
{code:java}
<transformer 
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
    
<resource>META-INF/services/org.apache.flink.core.execution.PipelineExecutorFactory</resource></transformer>
 {code}

> Exception in thread "main" java.lang.IllegalStateException: No 
> ExecutorFactory found to execute the application.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-19968
>                 URL: https://issues.apache.org/jira/browse/FLINK-19968
>             Project: Flink
>          Issue Type: Bug
>          Components: API / DataStream
>    Affects Versions: 1.11.2
>            Reporter: PeteZhang
>            Priority: Major
>         Attachments: iShot2020-11-04 18.06.39.png
>
>
> In idea, I added the pom of flink-clients, which can run normally. After I 
> packaged it with maven and run it with java-jar, this error would still be 
> reported. All versions before 1.11 can run normally, and it has been 
> determined that there is this dependency in the pom.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to