If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.


Needs to add netty-transport-native-epoll with a OS classifier to the classpath, it's not included in netty-all


This might be an issue with the file location in the Spark submit command. Try it with "spark-submit --master spark://master:7077 {file location}"

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    • java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at at org.springframework.boot.loader.Launcher.launch( at org.springframework.boot.loader.Launcher.launch( at org.springframework.boot.loader.JarLauncher.main( Caused by: java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.context.ApplicationContextInitializer : org.cloudfoundry.reconfiguration.spring.CloudPropertySourceApplicationContextInitializer at org.springframework.boot.SpringApplication.createSpringFactoriesInstances( at org.springframework.boot.SpringApplication.getSpringFactoriesInstances( at org.springframework.boot.SpringApplication.getSpringFactoriesInstances( at org.springframework.boot.SpringApplication.initialize( at org.springframework.boot.SpringApplication.<init>( at at at willitconnect.WillItConnectApplication.main( ... 8 more Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextInitializer at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass( at at at$100( at$ at$ at Method) at at java.lang.ClassLoader.loadClass( at sun.misc.Launcher$AppClassLoader.loadClass( at java.lang.ClassLoader.loadClass( at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass( at java.lang.ClassLoader.loadClass( at org.springframework.util.ClassUtils.forName( at org.springframework.boot.SpringApplication.createSpringFactoriesInstances( ... 15 more Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextInitializer at at java.lang.ClassLoader.loadClass( at sun.misc.Launcher$AppClassLoader.loadClass( at java.lang.ClassLoader.loadClass( ... 31 more

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Andreas Häber
    3 times, last one,
    1 times, last one,
    10 times, last one,
    1499 more bugmates