Re: StreamTable Environment initialized failed -- "Could not find any factories that implement 'org.apache.flink.table.delegation.ExecutorFactory' in the classpath"

2023-05-15 Thread krislee

Hi  Sharil,


I've tried your suggestion, but unfortunately it does not work, same 
exception.


Any other ideas ?


Thanks,

Leo


在 2023/5/15 20:15, Sharil Shafie 写道:

Hi,

May be you could try table planner loader instead.


org.apache.flink
flink-table-planner-loader
    1.16.0
    provided


Regards.


On Mon, 15 May 2023, 18:54 krislee,  wrote:

Hi  ALL,

OS:   CentOS 7.9

Flink version:  1.16.0


It looks like  I'm hitting a  notorious exception which had been
discoverd since earlier fink version. The issue was triggered

when below java code executed:

    StreamTableEnvironment tEnv = StreamTableEnvironment.create(env);

More detailed trace is as below :

Exception in thread "main" org.apache.flink.table.api.TableException: Could 
not instantiate the executor. Make sure a planner module is on the classpath
at 
org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:109)
at 
org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.create(StreamTableEnvironmentImpl.java:101)
at 
org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:122)
at 
org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:94)
at 
com.sugon.cloud.paas.flink.cdc.FlinkCDC_mysql2doris_example.main(FlinkCDC_mysql2doris_example.java:63)

Caused by: org.apache.flink.table.api.ValidationException: Could not find 
any factories that implement 
'org.apache.flink.table.delegation.ExecutorFactory' in the classpath.
at 
org.apache.flink.table.factories.FactoryUtil.discoverFactory(FactoryUtil.java:533)
at 
org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:106)
... 4 more



What I've done:
1) Added missed dependencies in "pom.xml",  for example:



 org.apache.flink

 flink-table-api-java-uber

 1.16.1

 provided








org.apache.flink

flink-table-planner_${scala.binary.version}

${flink.version}

provided




2)Tried two methods to run application, got same error(see above)
   
mvn exec:java -Dexec.mainClass="xxx"


java -jar target/xxx.jar


I'm confused by the error because all necessary jar files does exist in 
Maven's local repository
or FLINK_HOME's lib dir.


The completed "pom.xml" is included in attachment.


Thanks,
Leo





Re: StreamTable Environment initialized failed -- "Could not find any factories that implement 'org.apache.flink.table.delegation.ExecutorFactory' in the classpath"

2023-05-15 Thread Shammon FY
Hi krislee,

I think you can try to add the path of jars in FLINK_HOME to the classpath
of your command, such as

1. mvn exec:java -Dexec.mainClass="xxx" -Dexec.classpathScope="your
classpath"
2. java -jar target/xxx.jar -cp {your classpath}

Or you can run your application in IDE directly after the planner
dependency is added.

Best,
Shammon FY

On Mon, May 15, 2023 at 10:18 PM Lucifer_jl  wrote:

> hi:
> I think there may be the following reasons:
> 1、the scope of dependency  is 'provided' in your  "pom.xml" 。When you
> package, this dependency will not be included in the jar. and you xxx.jar
> execution enviroment lack this dependency
> 2、i can not see the "pom.xml" completely,can you add the dependency
> 
> org.apache.flink
> flink-table-api-scala-bridge_2.11
> 1.9.0
> 
> good luck
>


Re: StreamTable Environment initialized failed -- "Could not find any factories that implement 'org.apache.flink.table.delegation.ExecutorFactory' in the classpath"

2023-05-15 Thread Lucifer_jl
hi:
I think there may be the following reasons:
1、the scope of dependency is 'provided' in your "pom.xml" 。When you package, 
this dependency will not be included in the jar. and you xxx.jar execution 
enviroment lack this dependency
2、i can not see the "pom.xml" completely,can you add the dependency 

org.apache.flink
flink-table-api-scala-bridge_2.11
1.9.0

good luck


Re: StreamTable Environment initialized failed -- "Could not find any factories that implement 'org.apache.flink.table.delegation.ExecutorFactory' in the classpath"

2023-05-15 Thread Sharil Shafie
Hi,

May be you could try table planner loader instead.


org.apache.flink
flink-table-planner-loader
1.16.0
provided


Regards.


On Mon, 15 May 2023, 18:54 krislee,  wrote:

> Hi  ALL,
>
> OS:   CentOS 7.9
>
> Flink version:  1.16.0
>
>
> It looks like  I'm hitting a  notorious exception which had been discoverd
> since earlier fink version.  The issue was triggered
>
> when below java code executed:
>
>StreamTableEnvironment tEnv = StreamTableEnvironment.create(env);
>
> More detailed trace is as below :
>
> Exception in thread "main" org.apache.flink.table.api.TableException: Could 
> not instantiate the executor. Make sure a planner module is on the classpath
>   at 
> org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:109)
>   at 
> org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.create(StreamTableEnvironmentImpl.java:101)
>   at 
> org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:122)
>   at 
> org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:94)
>   at 
> com.sugon.cloud.paas.flink.cdc.FlinkCDC_mysql2doris_example.main(FlinkCDC_mysql2doris_example.java:63)
>
> Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
> factories that implement 'org.apache.flink.table.delegation.ExecutorFactory' 
> in the classpath.
>   at 
> org.apache.flink.table.factories.FactoryUtil.discoverFactory(FactoryUtil.java:533)
>   at 
> org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:106)
>   ... 4 more
>
>
>
> What I've done:
> 1) Added missed dependencies in "pom.xml",  for example:
>
>
> 
>
> org.apache.flink
>
> flink-table-api-java-uber
>
> 1.16.1
>
> provided
>
> 
>
> 
>
>
>
>org.apache.flink
>
>flink-table-planner_${scala.binary.version}
>
>${flink.version}
>
>provided
>
> 
>
> 2)Tried two methods to run application, got same error(see above) mvn
> exec:java -Dexec.mainClass="xxx" java -jar target/xxx.jar I'm confused by
> the error because all necessary jar files does exist in Maven's local
> repository or FLINK_HOME's lib dir. The completed "pom.xml" is included in
> attachment. Thanks, Leo
>
>


StreamTable Environment initialized failed -- "Could not find any factories that implement 'org.apache.flink.table.delegation.ExecutorFactory' in the classpath"

2023-05-15 Thread krislee

Hi  ALL,

OS:   CentOS 7.9

Flink version:  1.16.0


It looks like  I'm hitting a  notorious exception which had been 
discoverd since earlier fink version.  The issue was triggered


when below java code executed:

   StreamTableEnvironment tEnv = StreamTableEnvironment.create(env);

More detailed trace is as below :

Exception in thread "main" org.apache.flink.table.api.TableException: Could not 
instantiate the executor. Make sure a planner module is on the classpath
at 
org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:109)
at 
org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.create(StreamTableEnvironmentImpl.java:101)
at 
org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:122)
at 
org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:94)
at 
com.sugon.cloud.paas.flink.cdc.FlinkCDC_mysql2doris_example.main(FlinkCDC_mysql2doris_example.java:63)

Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
factories that implement 'org.apache.flink.table.delegation.ExecutorFactory' in 
the classpath.
at 
org.apache.flink.table.factories.FactoryUtil.discoverFactory(FactoryUtil.java:533)
at 
org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:106)
... 4 more



What I've done:
1) Added missed dependencies in "pom.xml",  for example:



org.apache.flink

flink-table-api-java-uber

1.16.1

provided






   

   org.apache.flink

   flink-table-planner_${scala.binary.version}

   ${flink.version}

   provided




2)Tried two methods to run application, got same error(see above)
  
   mvn exec:java -Dexec.mainClass="xxx"


   java -jar target/xxx.jar


   I'm confused by the error because all necessary jar files does exist in 
Maven's local repository
or FLINK_HOME's lib dir.


The completed "pom.xml" is included in attachment.


Thanks,
Leo




http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;>
  4.0.0

  com.mycompany.cloud.bigdata.flink
  flink-cdc-doris-example
  1.0-SNAPSHOT
  jar

  
UTF-8
1.8
1.8
1.16.0
2.3.0
2.12

  

  


  org.apache.flink
  flink-java
  ${flink.version}


  org.apache.flink
  flink-streaming-java
  ${flink.version}


  org.apache.flink
  flink-table-api-java-bridge
  ${flink.version}




  com.ververica
  flink-connector-mysql-cdc
  ${flink.connector.version}




  
  org.apache.flink
  flink-table-planner_${scala.binary.version}
  ${flink.version}
  provided




  org.apache.flink
  flink-table-api-java-uber
  ${flink.version}
  provided

  

  

  
org.apache.maven.plugins
maven-compiler-plugin
3.8.1

  ${maven.compiler.source}
  ${maven.compiler.target}

  
  
org.apache.maven.plugins
maven-shade-plugin
3.2.4

  
package

  shade


  



  com.mycompany.cloud.bigdata.flink.cdc.FlinkCDC_mysql2doris_example

  
  

  org.apache.flink:force-shading

  
  
 
*:*

  META-INF/*.SF
  META-INF/*.DSA
  META-INF/*.RSA

 
  

  

  

  
  


StreamTable Environment initialized failed -- "Could not find any factories that implement 'org.apache.flink.table.delegation.ExecutorFactory' in the classpath"

2023-05-15 Thread krislee

Hi  ALL,

OS:   CentOS 7.9

Flink version:  1.16.0


It looks like  I'm hitting a  notorious exception which had been 
discoverd since earlier fink version.  The issue was triggered


when below java code executed:

   StreamTableEnvironment tEnv = StreamTableEnvironment.create(env);

More detailed trace is as below :

Exception in thread "main" org.apache.flink.table.api.TableException: Could not 
instantiate the executor. Make sure a planner module is on the classpath
at 
org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:109)
at 
org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.create(StreamTableEnvironmentImpl.java:101)
at 
org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:122)
at 
org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:94)
at 
com.sugon.cloud.paas.flink.cdc.FlinkCDC_mysql2doris_example.main(FlinkCDC_mysql2doris_example.java:63)

Caused by: org.apache.flink.table.api.ValidationException: Could not find any 
factories that implement 'org.apache.flink.table.delegation.ExecutorFactory' in 
the classpath.
at 
org.apache.flink.table.factories.FactoryUtil.discoverFactory(FactoryUtil.java:533)
at 
org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:106)
... 4 more



What I've done:
1) Added missed dependencies in "pom.xml",  for example:



org.apache.flink

flink-table-api-java-uber

1.16.1

provided






   

   org.apache.flink

   flink-table-planner_${scala.binary.version}

   ${flink.version}

   provided




2)Tried two methods to run application, got same error(see above)
  
   mvn exec:java -Dexec.mainClass="xxx"


   java -jar target/xxx.jar


   I'm confused by the error because all necessary jar files does exist in 
Maven's local repository
or FLINK_HOME's lib dir.


The completed "pom.xml" is included in attachment.


Thanks,
Leo




http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;>
  4.0.0

  com.mycompany.cloud.bigdata.flink
  flink-cdc-doris-example
  1.0-SNAPSHOT
  jar

  
UTF-8
1.8
1.8
1.16.0
2.3.0
2.12

  

  


  org.apache.flink
  flink-java
  ${flink.version}


  org.apache.flink
  flink-streaming-java
  ${flink.version}


  org.apache.flink
  flink-table-api-java-bridge
  ${flink.version}




  com.ververica
  flink-connector-mysql-cdc
  ${flink.connector.version}




  
  org.apache.flink
  flink-table-planner_${scala.binary.version}
  ${flink.version}
  provided




  org.apache.flink
  flink-table-api-java-uber
  ${flink.version}
  provided

  

  

  
org.apache.maven.plugins
maven-compiler-plugin
3.8.1

  ${maven.compiler.source}
  ${maven.compiler.target}

  
  
org.apache.maven.plugins
maven-shade-plugin
3.2.4

  
package

  shade


  



  com.mycompany.cloud.bigdata.flink.cdc.FlinkCDC_mysql2doris_example

  
  

  org.apache.flink:force-shading

  
  
 
*:*

  META-INF/*.SF
  META-INF/*.DSA
  META-INF/*.RSA