java.lang.NoClassDefFoundError: com/google/common/cache/RemovalListener

Stack Overflow | bukashka101 | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Google Guice can't find class

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

    ClassNotFoundException and NoClassDefException

    w3facility.org | 2 years 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.<clinit>(Errors.java:656) at com.google.inject.internal.InternalInjectorCreator.<init>(InternalInjectorCreator.java:62)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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
  6. 0

    GitHub comment 136#268126209

    GitHub | 4 months ago | edmilsonrobson
    java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableList
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.cache.RemovalListener

    at java.net.URLClassLoader.findClass()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    2. java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    3. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    4 frames
  3. Google Guice - Core Library
    Guice.createInjector
    1. com.google.inject.internal.InheritingState.<init>(InheritingState.java:67)
    2. com.google.inject.internal.InjectorShell$Builder.getState(InjectorShell.java:209)
    3. com.google.inject.internal.InjectorShell$Builder.lock(InjectorShell.java:115)
    4. com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
    5. com.google.inject.Guice.createInjector(Guice.java:96)
    6. com.google.inject.Guice.createInjector(Guice.java:73)
    7. com.google.inject.Guice.createInjector(Guice.java:62)
    7 frames
  4. com.dugin.rostislav
    Main.main
    1. com.dugin.rostislav.image.Main.main(Main.java:8)
    1 frame
  5. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:498)
    4 frames
  6. IDEA
    AppMain.main
    1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
    1 frame