java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableList

Sonatype JIRA | Brandon Richins | 5 years ago
  1. 0

    nexus-repository-conversion-tool fails when run with java -jar as per the documentation on https://docs.sonatype.com/display/SPRTNXOSS/Nexus+Command+Line+Tools. The error and stack trace can be seen below. java -jar ~/nexus-repository-conversion-tool-2.0.4-1-cli.jar Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableList at com.google.inject.internal.Errors.<clinit>(Errors.java:648) at com.google.inject.internal.InternalInjectorCreator.<init>(InternalInjectorCreator.java:62) at com.google.inject.Guice.createInjector(Guice.java:96) at com.google.inject.Guice.createInjector(Guice.java:73) at com.google.inject.Guice.createInjector(Guice.java:62) at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:470) at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:196) at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:160) at org.codehaus.plexus.tools.cli.AbstractCli.execute(AbstractCli.java:159) at org.codehaus.plexus.tools.cli.AbstractCli.execute(AbstractCli.java:67) at org.sonatype.nexus.tools.repository.RepositoryConvertorCli.main(RepositoryConvertorCli.java:53) Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableList at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 11 more I think it's a missing Guava dependency. When I downloaded Guava 12.0 and ran "java -cp $HOME/guava-12.0.jar:$HOME/nexus-repository-conversion-tool-2.0.4-1-cli.jar org.sonatype.nexus.tools.repository.RepositoryConvertorCli -r foo -o bar" it worked.

    Sonatype JIRA | 5 years ago | Brandon Richins
    java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableList
  2. 0

    ClassNotFoundException and NoClassDefException

    w3facility.org | 1 year ago
    java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableList
  3. 0

    Java build path errors on Eclipse

    Stack Overflow | 3 years ago | Michał Szydłowski
    java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableList at com.google.inject.internal.Errors.&lt;clinit&gt;(Errors.java:656) at com.google.inject.internal.InternalInjectorCreator.&lt;init&gt;(InternalInjectorCreator.java:62)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Google Guice can't find class

    Stack Overflow | 3 months ago | bukashka101
    java.lang.NoClassDefFoundError: com/google/common/cache/RemovalListener
  6. 0

    Runtime exception when creating OWLOntologyManager

    GitHub | 1 week ago | krisnadhi
    java.lang.NoClassDefFoundError: com/google/common/collect/Sets

  1. archenroot 1 times, last 1 week ago
  2. tyson925 5 times, last 2 weeks ago
  3. tzrlk 1 times, last 2 weeks ago
  4. musketyr 1 times, last 2 weeks ago
  5. kjhdofjosvs 3 times, last 3 weeks ago
63 more registered users
32 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

    com.google.common.collect.ImmutableList

    at java.net.URLClassLoader$1.run()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    2. java.security.AccessController.doPrivileged(Native Method)
    3. java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    5. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    6. java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    6 frames
  3. Google Guice - Core Library
    Guice.createInjector
    1. com.google.inject.internal.Errors.<clinit>(Errors.java:648)
    2. com.google.inject.internal.InternalInjectorCreator.<init>(InternalInjectorCreator.java:62)
    3. com.google.inject.Guice.createInjector(Guice.java:96)
    4. com.google.inject.Guice.createInjector(Guice.java:73)
    5. com.google.inject.Guice.createInjector(Guice.java:62)
    5 frames
  4. Plexus
    DefaultPlexusContainer.<init>
    1. org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:470)
    2. org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:196)
    3. org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:160)
    3 frames
  5. Plexus CLI
    AbstractCli.execute
    1. org.codehaus.plexus.tools.cli.AbstractCli.execute(AbstractCli.java:159)
    2. org.codehaus.plexus.tools.cli.AbstractCli.execute(AbstractCli.java:67)
    2 frames
  6. org.sonatype.nexus
    RepositoryConvertorCli.main
    1. org.sonatype.nexus.tools.repository.RepositoryConvertorCli.main(RepositoryConvertorCli.java:53)
    1 frame