Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [seatunnel-api-flink] Can not find BatchTableEnvironment class when using Flink-1.15.X #2927

Closed
3 tasks done
s7monk opened this issue Sep 28, 2022 · 6 comments
Closed
3 tasks done

Comments

@s7monk
Copy link
Contributor

s7monk commented Sep 28, 2022

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Can not find BatchTableEnvironment class when using Flink-1.15.X

SeaTunnel Version

dev

SeaTunnel Config

env {
  # You can set flink configuration here
  execution.parallelism = 1
  #execution.checkpoint.interval = 10000
  #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
}

source {
  # This is a example source plugin **only for test and demonstrate the feature source plugin**
    Jdbc {
      driver = com.mysql.cj.jdbc.Driver
      url = "jdbc:mysql://rm-bp17bvb1v77ad16l1to.mysql.rds.aliyuncs.com:3306/data_warehouse?serverTimezone=GMT%2b8&useSSL=false"
      user = "root"
      password = "123456"
      query = "select * from user"
      result_table_name = "test"
  }

  # If you would like to get more information about how to configure seatunnel and see full list of source plugins,
  # please go to https://seatunnel.apache.org/docs/flink/configuration/source-plugins/Fake
}

transform {

  # If you would like to get more information about how to configure seatunnel and see full list of transform plugins,
  # please go to https://seatunnel.apache.org/docs/flink/configuration/transform-plugins/Sql
}

sink {
  Console{}

  # If you would like to get more information about how to configure seatunnel and see full list of sink plugins,
  # please go to https://seatunnel.apache.org/docs/flink/configuration/sink-plugins/Console
}

Running Command

bin/start-seatunnel-flink-connector-v2.sh -c job/rds_to_console.conf

Error Exception

java.lang.NoClassDefFoundError: org/apache/flink/table/api/bridge/java/BatchTableEnvironment
	at org.apache.seatunnel.flink.FlinkEnvironment.createBatchTableEnvironment(FlinkEnvironment.java:229)
	at org.apache.seatunnel.flink.FlinkEnvironment.prepare(FlinkEnvironment.java:96)
	at org.apache.seatunnel.flink.FlinkEnvironment.prepare(FlinkEnvironment.java:55)
	at org.apache.seatunnel.core.starter.config.EnvironmentFactory.getEnvironment(EnvironmentFactory.java:46)
	at org.apache.seatunnel.core.starter.flink.execution.FlinkExecution.<init>(FlinkExecution.java:55)
	at org.apache.seatunnel.core.starter.flink.command.FlinkApiTaskExecuteCommand.execute(FlinkApiTaskExecuteCommand.java:53)
	at org.apache.seatunnel.core.starter.Seatunnel.run(Seatunnel.java:40)
	at org.apache.seatunnel.core.starter.flink.SeatunnelFlink.main(SeatunnelFlink.java:34)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355)
	at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:222)
	at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114)
	at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:836)
	at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:247)
	at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1078)
	at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1156)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1729)
	at org.apache.flink.runtime.security.contexts.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
	at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1156)
Caused by: java.lang.ClassNotFoundException: org.apache.flink.table.api.bridge.java.BatchTableEnvironment
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at org.apache.flink.util.FlinkUserCodeClassLoader.loadClassWithoutExceptionHandling(FlinkUserCodeClassLoader.java:68)
	at org.apache.flink.util.ChildFirstClassLoader.loadClassWithoutExceptionHandling(ChildFirstClassLoader.java:65)
	at org.apache.flink.util.FlinkUserCodeClassLoader.loadClass(FlinkUserCodeClassLoader.java:52)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 24 more

Flink or Spark Version

Flink-1.15.2

Java or Scala Version

java8

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@s7monk s7monk added the bug label Sep 28, 2022
@EricJoy2048
Copy link
Member

Great.

@hk-lrzy
Copy link
Contributor

hk-lrzy commented Sep 28, 2022

Maybe i can work on this one if you don't have ant free time.
@s7monk

@liugddx
Copy link
Member

liugddx commented Oct 24, 2022

This can be added to the roadmap? @EricJoy2048

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label Nov 24, 2022
@liugddx
Copy link
Member

liugddx commented Nov 24, 2022

#3263

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants