The BlobClassloader uses the App classloader as the parent. That should make the classloading go first to the app classpath (TaskManager's classpath) and then to the user-defined code. Is that broken somehow?
On Sun, Sep 6, 2015 at 1:40 PM, gkrastev <joro.kr...@gmail.com> wrote: > Hi,I'm facing the exact same issue when running a custom Flink interpreter > in > Zeppelin, so it's a case of special classloader. I'm adding the Flink jars > to the Scala REPL's classpath manually, so I end up with the following > classloader chain:1. Boot classloader2. App classloader3. Scala classloader > -> has Flink on the classpath4. Translating classloader for the Scala > REPLSo > the class is accessible in the vanilla Zeppelin shell. E.g. the following > code works fine: > > println(classOf[org.apache.flink.api.common.operators.util.UserCodeObjectWrapper[String]]) > However, the classloader chain in the Task Manager looks differently:1. > Boot > classloader2. App classloader3. Flink's Blob classloaderAnd the following > code fails: > import org.apache.flink.api.scala._env.fromCollection(1 to 100).reduce { _ > + > _ }.collect() > because the Flink jars are no longer on the classpath. The question is, why > doesn't Flink pickup the current classloader/classpath when starting Task > Managers, and can I add entries to their classpath manually? > Robert Metzger wrote > > Can you give us some context what you are trying to do?It sounds a lot > > like you would like to develop a Flink Plugin for Eclipse?And that plugin > > needs Flink dependencies?Sorry for asking so many questions, but the > issue > > you are facing sounds alot like a) a very special classloader or b) > > corrupt files.I think some more info on what you are doing might help us > > to understandthe issue to give you better help. > > > > > > -- > View this message in context: > http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/ClassNotFoundException-org-apache-flink-api-common-operators-util-UserCodeObjectWrapper-while-tryingy-tp5922p7870.html > Sent from the Apache Flink Mailing List archive. mailing list archive at > Nabble.com. >