You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "xujiangfeng001 (via GitHub)" <gi...@apache.org> on 2023/12/01 06:59:37 UTC
[I] [Bug] Failed to submit job on yarn [incubator-streampark]
xujiangfeng001 opened a new issue, #3369:
URL: https://github.com/apache/incubator-streampark/issues/3369
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/incubator-streampark/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
### Java Version
1.8
### Scala Version
2.12.x
### StreamPark Version
dev
### Flink Version
1.14.6
### deploy mode
yarn-perjob
### What happened
After failing to submit the job, debugging revealed that the exception occurred when executing `callMainMethod` in the `org. apache. flink. client. program. PackagedProgram` class:
```
private static void callMainMethod(Class<?> entryClass, String[] args) throws ProgramInvocationException {
if (!Modifier.isPublic(entryClass.getModifiers())) {
throw new ProgramInvocationException("The class " + entryClass.getName() + " must be public.");
} else {
Method mainMethod;
try {
mainMethod = entryClass.getMethod("main", String[].class);
} catch (NoSuchMethodException var5) {
throw new ProgramInvocationException("The class " + entryClass.getName() + " has no main(String[]) method.");
} catch (Throwable var6) {
throw new ProgramInvocationException("Could not look up the main(String[]) method from the class " + entryClass.getName() + ": " + var6.getMessage(), var6);
}
if (!Modifier.isStatic(mainMethod.getModifiers())) {
throw new ProgramInvocationException("The class " + entryClass.getName() + " declares a non-static main method.");
} else if (!Modifier.isPublic(mainMethod.getModifiers())) {
throw new ProgramInvocationException("The class " + entryClass.getName() + " declares a non-public main method.");
} else {
try {
mainMethod.invoke((Object)null, args);
} catch (IllegalArgumentException var7) {
throw new ProgramInvocationException("Could not invoke the main method, arguments are not matching.", var7);
} catch (IllegalAccessException var8) {
throw new ProgramInvocationException("Access to the main method was denied: " + var8.getMessage(), var8);
} catch (InvocationTargetException var9) {
Throwable exceptionInMethod = var9.getTargetException();
if (exceptionInMethod instanceof Error) {
throw (Error)exceptionInMethod;
} else if (exceptionInMethod instanceof ProgramParametrizationException) {
throw (ProgramParametrizationException)exceptionInMethod;
} else if (exceptionInMethod instanceof ProgramInvocationException) {
throw (ProgramInvocationException)exceptionInMethod;
} else {
throw new ProgramInvocationException("The main method caused an error: " + exceptionInMethod.getMessage(), exceptionInMethod);
}
} catch (Throwable var10) {
throw new ProgramInvocationException("An error occurred while invoking the program's main method: " + var10.getMessage(), var10);
}
}
}
}
```
Execute `mainMethod. invoke ((Object) null, args)` a exception was thrown during the process, causing the execution of the following code in `org. apache. streampark. common. util. ClassLoaderUtils` to failed:
```
def runAsClassLoader[R](targetClassLoader: ClassLoader, func: () => R): R = {
try {
Thread.currentThread.setContextClassLoader(targetClassLoader)
func()
} catch {
case e: Exception => throw e
} finally {
Thread.currentThread.setContextClassLoader(originalClassLoader)
}
}
```
### Error Exception
```log
java.lang.ClassCastException: org.codehaus.janino.CompilerFactory cannot be cast to org.codehaus.commons.compiler.ICompilerFactory
```
### Screenshots
callMainMethod:
<img width="1827" alt="1" src="https://github.com/apache/incubator-streampark/assets/104614523/6582fe95-6e24-4253-820e-0df315a8960e">
runAsClassLoader:
<img width="1794" alt="2" src="https://github.com/apache/incubator-streampark/assets/104614523/0244aba8-b500-4a4c-8e9a-ae5a7ff8f634">
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!(您是否要贡献这个PR?)
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Failed to submit job on yarn [streampark]
Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on issue #3369:
URL: https://github.com/apache/streampark/issues/3369#issuecomment-5523141644
Thanks for your feedback. We are closing this issue because it is outdated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Failed to submit job on yarn [streampark]
Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys closed issue #3369: [Bug] Failed to submit job on yarn
URL: https://github.com/apache/streampark/issues/3369
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org