java.lang.NoClassDefFoundError

com/google/common/cache/CacheLoader


Samebug tips6

I had to build one fat jar that will include all dependencies from the other jars that i wanted to use.

This error means there's a class missing in your classpath during runtime. You need to create a jar with all your dependencies and have it in your classpath. Check Maven Assembly Plugin and how to add your dependencies to a jar: https://goo.gl/U2zr8k

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web9711

Solution icon of github
com/google/common/cache/CacheLoader

Solution icon of googlegroups
via Google Groups by Jörg, 4 weeks ago
com/google/common/cache/CacheLoader

Solution icon of web
via blogspot.nl by Unknown author, 1 year ago
com/google/common/cache/CacheLoader

Solution icon of atlassian
via Atlassian JIRA by Renjith [Atlassian], 1 year ago
com/google/common/cache/CacheLoader

Solution icon of java
via Java.net JIRA by vanuatoo, 1 year ago
com/google/common/cache/CacheLoader

Solution icon of stackoverflow
via Stack Overflow by S. Mess
, 1 year ago
com/google/common/cache/CacheLoader

Solution icon of stackoverflow
com/google/common/cache/CacheLoader

Solution icon of github
via GitHub by 0x3333
, 1 year ago
com/google/common/cache/CacheLoader

Solution icon of googlegroups
via Google Groups by Koset Surakomol, 4 weeks ago
com/google/common/cache/CacheLoader

Solution icon of atlassian
via Atlassian JIRA by Renjith [Atlassian], 1 year ago
com/google/common/cache/CacheLoader

Stack trace

  • java.lang.NoClassDefFoundError: com/google/common/cache/CacheLoader 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: com.google.common.cache.CacheLoader at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more

Write tip

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

Users with the same issue

3 times, 1 month ago
Once, 2 months ago
Samebug visitor profile picture
Unknown user
Once, 3 months ago
Samebug visitor profile picture
Unknown user
Once, 3 months ago
Samebug visitor profile picture
Unknown user
Once, 3 months ago
1552 more bugmates