zentol commented on a change in pull request #16345:
URL: https://github.com/apache/flink/pull/16345#discussion_r663097653



##########
File path: 
flink-core/src/main/java/org/apache/flink/core/plugin/PluginLoader.java
##########
@@ -177,16 +177,16 @@ public P next() {
                     return resolveIfNeeded(resolve, loadedClass);
                 }
 
-                if (isAllowedFlinkClass(name)) {
-                    try {
+                try {

Review comment:
       Maybe, I'm not entirely sure myself.
   
   Symptom: a NoSuchMethodError on some call from Flink into scala
   
   Observation: IntelliJ puts both flink-rpc-akka and dependencies (akka, 
scala) on the test classpath, and because of the plugin loader these are then 
loaded parent-first.
   
   Theory: Because the flink-rpc-akka classes are loaded parent-first IntelliJ 
is not using what is in the flink-rpc-akka jar, but instead what it compiled 
itself. I think it mixes up the scala versions somehow, in that it puts scala 
2.12 on the CP (which is correct) but compiled flink-rpc-akka with scala 2.11. 
I don't know how InteliiJ determines which Scala version to use for 
compilation; it could very well be an issue in my IDE configuration.
   To reproduce the issue, revert the [experimental] commit and run the 
`RpcConnectionTest`
   
   By forcing the plugin loader to go child-first we always load what is 
actually in the flink-rpc-akka jar, which is guaranteed to be consistent in 
regards to scala in itself.




-- 
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-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to