Skip to content

Cannot submit jobs to Flink #255

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

Open
ZachFontenot opened this issue May 16, 2025 · 7 comments
Open

Cannot submit jobs to Flink #255

ZachFontenot opened this issue May 16, 2025 · 7 comments

Comments

@ZachFontenot
Copy link

Hey There,

I was just trying this out via the Giter template. I followed the instructions to remove the scala_2.12 jar from the flink/lib directory and set the class-loader pattern to exclude scala.

I've tried both adding the scala 2.13 and scala 3 library jars to the flink/lib folder, as well as manually passing them both + individually to the flink run command.

Either I get an error related to not finding Scala libs at all.
org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: Scala products are used but Scala API is not on the classpath.

Or some missing path like scala/collection/immutable or scala/runtime/Nothing

I have tried this with both Flink 2.0.0 and Flink 1.20.1

sbt run works and prints out the wordCount output

@ZachFontenot
Copy link
Author

ZachFontenot commented May 16, 2025

Alright, new thing I'm going to try is using versions EXACTLY as they were in that other issue about a similar thing and see if I can at least make some progress towards getting this to work. I'm too stupid about Classpath stuff in general to understand what's happening and what needs to happen

@ZachFontenot
Copy link
Author

Same problem.

@novakov-alexey
Copy link
Collaborator

Have you tried to remove scala package from this property Flink configuration property?

classloader.parent-first-patterns.default: java.;org.apache.flink.;com.esotericsoftware.kryo;org.apache.hadoop.;javax.annotation.;org.xml;javax.xml;org.apache.xerces;org.w3c;org.rocksdb.;org.slf4j;org.apache.log4j;org.apache.logging;org.apache.commons.logging;ch.qos.logback```

@ZachFontenot
Copy link
Author

yes, didn't work either. I can run via the Java API with Scala fwiw, so I may just lean into that. I'm confused why the UberJar with the library wouldn't work, likewise with all the other variety of ways of passing the scala libs to the classpath.

@novakov-alexey
Copy link
Collaborator

Could you describe where do you deploy Flink fat JAR? It is on-prem Flink Standalone cluster?

@ZachFontenot
Copy link
Author

Just the local cluster

@novakov-alexey
Copy link
Collaborator

novakov-alexey commented May 18, 2025

let me try with latest version. I guess by local cluster you mean Flink standalone mode like this https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/resource-providers/standalone/overview/ and not something else.

I guess we need to prepare some docker-compose example to prevent people from being stuck at the very beginning.

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

No branches or pull requests

2 participants