Hi! Running this is Spring, the whole classloader configuration is probably a bit different than in Flink's standalone or YARN or local mode.
Can you try if the following solves your problem: At the end of the file "BlobLibraryCacheManager", there is the private class "FlinkUserCodeClassloader". Can you replace the current FlinkUserCodeClassloader with this? private static class FlinkUserCodeClassLoader extends URLClassLoader { public FlinkUserCodeClassLoader(URL[] urls) { super(urls, FlinkUserCodeClassLoader.class.getClassLoader()); } } You can also try and use instead of " FlinkUserCodeClassLoader.class.getClassLoader()" the statements " Thread.currentThread().getContextClassLoader()". Let me know if one of the two solves the problem. Greetings, Stephan On Wed, Jan 13, 2016 at 7:20 PM, Prez Cannady <revp...@opencorrelate.org> wrote: > I’m experimenting combining Spring with Flink. I’ve successfully > instrumented for Gradle, but Maven is emitting ClassNotFoundExceptions for > items ostensibly on the class path. > > Project is currently configured for: > > 1. Scala 2.10.4 > 2. Flink 0.9.1 > > I execute the following > > ``` > # In one terminal > $ nc -lk -p 9999 --sh-exec "cat /usr/share/dict/words | head -n 10” > > > # In another terminal > $ mvn clean install spring-boot:run -Drun.arguments=“localhost,9999” > > # observe output > ``` > > The specific class not found is > *org.apache.flink.streaming.runtime.tasks.OneInputStreamTask*. However, > Spring Boot Plugin is configured to repackage a fat jar, and I can see that > the class is present in the included flink-streaming-core jar. > Additionally, LogBack shows that the flink-streaming-core jar is in my > classpath. > > > I’m hoping I’m just missing something that should be obvious. While I > wish could move forward with just Gradle, unfortunately I have to support > Maven builds. > > For reference, the complete project is available here: > > https://github.com/OCExercise/wordcount-processing > > Additionally > > 1. pom.xml ( > https://github.com/OCExercise/wordcount-processing/blob/master/pom.xml) > 2. build.grade ( > https://github.com/OCExercise/wordcount-processing/blob/master/build.gradle > ) > 3. Gist containing the full exception ( > https://gist.github.com/revprez/2c1fb01c40e5d6790247) > > Prez Cannady > p: 617 500 3378 > e: revp...@opencorrelate.org > GH: https://github.com/opencorrelate > LI: https://www.linkedin.com/in/revprez > >