java.lang.NoClassDefFoundError: Could not initialize class Foo

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by starkej2
, 9 months ago
Could not initialize class io.reactivex.android.schedulers.AndroidSchedulers
via GitHub by leonidv
, 21 hours ago
Could not initialize class melnorme.lang.ide.core.tests.CommonCoreTest
via Google Groups by Furqan Ahmed via StackOverflow, 5 months ago
Could not initialize class com.google.apphosting.runtime.security.shared.stub.java.nio.file.Files at com.google.appengine.runtime.Request.process-cbe3f36b744636fe(Request.java)
via GitHub by timperrett
, 1 year ago
Could not initialize class remotely.Protocol$ at __wrapper$1$1f0d05e367554422b5b1348a671df812.__wrapper$1$1f0d05e367554422b5b1348a671df812$.wrapper(<no source file>:30)
java.lang.NoClassDefFoundError: Could not initialize class Foo
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.sourceforge.cobertura.coveragedata.TouchCollector.applyTouchesToSingleClassOnProjectData(TouchCollector.java:123)
at net.sourceforge.cobertura.coveragedata.TouchCollector.applyTouchesOnProjectData(TouchCollector.java:110)
at net.sourceforge.cobertura.coveragedata.ProjectData.saveGlobalProjectData(ProjectData.java:272)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.