java.lang.ClassNotFoundException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.

tip

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

tip

Check if you didn't forget to instantiate your topic in the kafka broker.

tip

NoClassDefFoundError means java has failed to find a class you're trying to instantiate, look if you've added the class you're trying to instantiate to the dependencies.

tip

You need to add httpcore to your dependencies. Try adding version 4.3 or further.

tip

Check if you've set a name in Application -> Run. If you didn't, the generated XML is gonna have missing information and then this exception will be thrown.

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

  • After upgrade to cm-13.0-20160305-NIGHTLY-mako.zip theme chooser crashes. 03-07 13:43:41.543 663 1327 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.cyanogenmod.theme.chooser/.ChooserActivity bnds=[245,448][384,607] (has extras)} from uid 10073 on display 0 03-07 13:43:41.677 8079 8079 I art : Rejecting re-init on previously-failed class java.lang.Class<org.cyanogenmod.theme.chooser.ChooserDetailFragment> 03-07 13:43:41.677 8079 8079 I art : Rejecting re-init on previously-failed class java.lang.Class<org.cyanogenmod.theme.chooser.ChooserDetailFragment> 03-07 13:43:41.687 4831 4842 W SearchService: Abort, client detached. 03-07 13:43:41.689 4831 8073 I DeviceStateChecker: DeviceStateChecker cancelled 03-07 13:43:41.691 4831 4831 I MicroDetector: Keeping mic open: false 03-07 13:43:41.694 4831 4831 I MicrophoneInputStream: mic_close com.google.android.apps.gsa.speech.audio.ae@e15d7fb 03-07 13:43:41.694 4831 8075 E AudioRecord-JNI: Error -4 during AudioRecord native read 03-07 13:43:41.748 225 8077 D audio_hw_primary: disable_audio_route: reset and update mixer path: audio-record 03-07 13:43:41.749 225 8077 D audio_hw_primary: disable_snd_device: snd_device(38: voice-rec-mic) 03-07 13:43:41.758 4831 6846 I MicroRecognitionRunner: Stopping hotword detection. 03-07 13:43:41.761 4831 8074 I MicroRecognitionRunner: Detection finished 03-07 13:43:41.763 1264 1264 I HeadsetService: Headset=false; Bluetooth=false ; USB=false; Speaker=true 03-07 13:43:41.773 8079 8079 I art : Rejecting re-init on previously-failed class java.lang.Class<org.cyanogenmod.theme.chooser.ChooserDetailFragment> 03-07 13:43:41.778 8079 8079 D AndroidRuntime: Shutting down VM 03-07 13:43:41.782 8079 8079 E AndroidRuntime: FATAL EXCEPTION: main 03-07 13:43:41.782 8079 8079 E AndroidRuntime: Process: org.cyanogenmod.theme.chooser, PID: 8079 03-07 13:43:41.782 8079 8079 E AndroidRuntime: Theme: themes:{default=overlay:system, iconPack:system, fontPkg:system, com.android.systemui=overlay:system, com.android.systemui.navbar=overlay:system} 03-07 13:43:41.782 8079 8079 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/provider/ThemesContract$ThemesColumns; 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at org.cyanogenmod.theme.chooser.ChooserBrowseFragment.onCreateLoader(ChooserBrowseFragment.java:244) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.LoaderManagerImpl.createLoader(LoaderManager.java:539) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.LoaderManagerImpl.createAndInstallLoader(LoaderManager.java:548) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.LoaderManagerImpl.initLoader(LoaderManager.java:602) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at org.cyanogenmod.theme.chooser.ChooserBrowseFragment.onCreateView(ChooserBrowseFragment.java:126) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1026) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1207) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:511) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1238) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.Activity.performStart(Activity.java:6268) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5456) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.provider.ThemesContract$ThemesColumns" on path: DexPathList[[zip file "/system/priv-app/ThemeChooser/ThemeChooser.apk"],nativeLibraryDirectories=[/system/priv-app/ThemeChooser/lib/arm, /vendor/lib, /system/lib]] 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: ... 24 more 03-07 13:43:41.782 8079 8079 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: android.provider.ThemesContract$ThemesColumns 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.Class.classForName(Native Method) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: ... 25 more 03-07 13:43:41.782 8079 8079 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available 03-07 13:43:41.786 663 1331 W ActivityManager: Force finishing activity org.cyanogenmod.theme.chooser/.ChooserActivity 03-07 13:43:41.834 5528 5528 D LogFetchServiceManager: Received entry added 03-07 13:43:41.843 663 7324 I OpenGLRenderer: Initialized EGL, version 1.4 03-07 13:43:41.915 663 673 I art : Background partial concurrent mark sweep GC freed 27196(1867KB) AllocSpace objects, 4(80KB) LOS objects, 33% free, 21MB/32MB, paused 1.708ms total 111.419ms
    via by Tomasz Filipek,
  • After upgrade to cm-13.0-20160305-NIGHTLY-mako.zip theme chooser crashes. 03-07 13:43:41.543 663 1327 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.cyanogenmod.theme.chooser/.ChooserActivity bnds=[245,448][384,607] (has extras)} from uid 10073 on display 0 03-07 13:43:41.677 8079 8079 I art : Rejecting re-init on previously-failed class java.lang.Class<org.cyanogenmod.theme.chooser.ChooserDetailFragment> 03-07 13:43:41.677 8079 8079 I art : Rejecting re-init on previously-failed class java.lang.Class<org.cyanogenmod.theme.chooser.ChooserDetailFragment> 03-07 13:43:41.687 4831 4842 W SearchService: Abort, client detached. 03-07 13:43:41.689 4831 8073 I DeviceStateChecker: DeviceStateChecker cancelled 03-07 13:43:41.691 4831 4831 I MicroDetector: Keeping mic open: false 03-07 13:43:41.694 4831 4831 I MicrophoneInputStream: mic_close com.google.android.apps.gsa.speech.audio.ae@e15d7fb 03-07 13:43:41.694 4831 8075 E AudioRecord-JNI: Error -4 during AudioRecord native read 03-07 13:43:41.748 225 8077 D audio_hw_primary: disable_audio_route: reset and update mixer path: audio-record 03-07 13:43:41.749 225 8077 D audio_hw_primary: disable_snd_device: snd_device(38: voice-rec-mic) 03-07 13:43:41.758 4831 6846 I MicroRecognitionRunner: Stopping hotword detection. 03-07 13:43:41.761 4831 8074 I MicroRecognitionRunner: Detection finished 03-07 13:43:41.763 1264 1264 I HeadsetService: Headset=false; Bluetooth=false ; USB=false; Speaker=true 03-07 13:43:41.773 8079 8079 I art : Rejecting re-init on previously-failed class java.lang.Class<org.cyanogenmod.theme.chooser.ChooserDetailFragment> 03-07 13:43:41.778 8079 8079 D AndroidRuntime: Shutting down VM 03-07 13:43:41.782 8079 8079 E AndroidRuntime: FATAL EXCEPTION: main 03-07 13:43:41.782 8079 8079 E AndroidRuntime: Process: org.cyanogenmod.theme.chooser, PID: 8079 03-07 13:43:41.782 8079 8079 E AndroidRuntime: Theme: themes:{default=overlay:system, iconPack:system, fontPkg:system, com.android.systemui=overlay:system, com.android.systemui.navbar=overlay:system} 03-07 13:43:41.782 8079 8079 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/provider/ThemesContract$ThemesColumns; 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at org.cyanogenmod.theme.chooser.ChooserBrowseFragment.onCreateLoader(ChooserBrowseFragment.java:244) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.LoaderManagerImpl.createLoader(LoaderManager.java:539) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.LoaderManagerImpl.createAndInstallLoader(LoaderManager.java:548) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.LoaderManagerImpl.initLoader(LoaderManager.java:602) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at org.cyanogenmod.theme.chooser.ChooserBrowseFragment.onCreateView(ChooserBrowseFragment.java:126) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1026) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1207) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:511) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1238) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.Activity.performStart(Activity.java:6268) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5456) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.provider.ThemesContract$ThemesColumns" on path: DexPathList[[zip file "/system/priv-app/ThemeChooser/ThemeChooser.apk"],nativeLibraryDirectories=[/system/priv-app/ThemeChooser/lib/arm, /vendor/lib, /system/lib]] 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: ... 24 more 03-07 13:43:41.782 8079 8079 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: android.provider.ThemesContract$ThemesColumns 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.Class.classForName(Native Method) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 03-07 13:43:41.782 8079 8079 E AndroidRuntime: ... 25 more 03-07 13:43:41.782 8079 8079 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available 03-07 13:43:41.786 663 1331 W ActivityManager: Force finishing activity org.cyanogenmod.theme.chooser/.ChooserActivity 03-07 13:43:41.834 5528 5528 D LogFetchServiceManager: Received entry added 03-07 13:43:41.843 663 7324 I OpenGLRenderer: Initialized EGL, version 1.4 03-07 13:43:41.915 663 673 I art : Background partial concurrent mark sweep GC freed 27196(1867KB) AllocSpace objects, 4(80KB) LOS objects, 33% free, 21MB/32MB, paused 1.708ms total 111.419ms
    via by Tomasz Filipek,
  • jsp to .class(or .java) to jsp
    via Stack Overflow by Mirzaei
    ,
  • Re: Running Job on Multinode Yarn Cluster
    via by Unknown author,
    • java.lang.ClassNotFoundException: com.android.tools.fd.runtime.BootstrapApplication at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Hiren Amaliyar
    2 times, last one,
    1897 more bugmates