java.lang.NoClassDefFoundError: scala/collection/immutable/List

Apache's JIRA Issue Tracker | Mark S | 1 year ago
  1. 0

    I am currently trying to run the Hello Samza example (http://samza.apache.org/startup/hello-samza/0.9/) and unfortunately when I try to run a Samza job I get the following exception: *Command* {code} deploy/samza/bin/run-job.sh --config-factory=org.apache.samza.config.factories.PropertiesConfigFactory --config-path=file://$PWD/deploy/samza/config/wikipedia-feed.properties {code} *Exception* {code} ... Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: scala/Function2 at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Caused by: java.lang.ClassNotFoundException: scala.Function2 at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more {code} If I edit vim deploy/samza/bin/run-class.sh and manually add the scala-library.jar to the CLASSPATH value, this error disappears, though the Hadoop Application will fail with a similarish exception (http://localhost:8088/). {code} Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: scala/collection/immutable/List at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Caused by: java.lang.ClassNotFoundException: scala.collection.immutable.List at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more {code} The following links might be related: * https://samza.apache.org/learn/tutorials/0.9/run-in-multi-node-yarn.html * https://issues.apache.org/jira/browse/SAMZA-456

    Apache's JIRA Issue Tracker | 1 year ago | Mark S
    java.lang.NoClassDefFoundError: scala/collection/immutable/List
  2. 0

    I am currently trying to run the Hello Samza example (http://samza.apache.org/startup/hello-samza/0.9/) and unfortunately when I try to run a Samza job I get the following exception: *Command* {code} deploy/samza/bin/run-job.sh --config-factory=org.apache.samza.config.factories.PropertiesConfigFactory --config-path=file://$PWD/deploy/samza/config/wikipedia-feed.properties {code} *Exception* {code} ... Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: scala/Function2 at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Caused by: java.lang.ClassNotFoundException: scala.Function2 at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more {code} If I edit vim deploy/samza/bin/run-class.sh and manually add the scala-library.jar to the CLASSPATH value, this error disappears, though the Hadoop Application will fail with a similarish exception (http://localhost:8088/). {code} Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: scala/collection/immutable/List at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Caused by: java.lang.ClassNotFoundException: scala.collection.immutable.List at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more {code} The following links might be related: * https://samza.apache.org/learn/tutorials/0.9/run-in-multi-node-yarn.html * https://issues.apache.org/jira/browse/SAMZA-456

    Apache's JIRA Issue Tracker | 1 year ago | Mark S
    java.lang.NoClassDefFoundError: scala/collection/immutable/List
  3. 0

    Intellij Maven: Create jar with all library dependencies

    Stack Overflow | 1 year ago | D. Müller
    java.lang.NoClassDefFoundError: com/amazonaws/auth/AWSCredentials
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Import data via the client library in Apache Marmotta

    Stack Overflow | 1 year ago | Efren
    java.lang.NoClassDefFoundError: org/apache/marmotta/client/exception/MarmottaClientException
  6. 0

    can't start master node on apache spark 1.4.1 (without hadoop)

    Stack Overflow | 1 year ago | Manuel Sopena Ballesteros
    java.lang.NoClassDefFoundError: org/slf4j/Logger

  1. Kialandei 3 times, last 1 week ago
  2. Cafecanudo 7 times, last 4 months ago
81 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    scala.collection.immutable.List

    at java.net.URLClassLoader$1.run()
  2. Java RT
    LauncherHelper.checkAndLoadMain
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    2. java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    3. java.security.AccessController.doPrivileged(Native Method)
    4. java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    5. java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    6. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    7. java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    8. java.lang.Class.getDeclaredMethods0(Native Method)
    9. java.lang.Class.privateGetDeclaredMethods(Class.java:2625)
    10. java.lang.Class.getMethod0(Class.java:2866)
    11. java.lang.Class.getMethod(Class.java:1676)
    12. sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
    13. sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
    13 frames