java.lang.ClassNotFoundException

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.

  • I am trying to embed XWalkView inside Android project (ant build system). I have added Android webview (ARM) 14.43.343.17 as module inside the project and and trying to add XWalkView but getting this error. I have extended the activity as XWalkActivity as it is telling to using shared mode (though I am using Samsung Note 4 for testing which is arm based processor) This the log I am getting. Please help Process: org.cocos2dx.LearnWorldTemplate, PID: 12688 java.lang.NoClassDefFoundError: Failed resolution of: Lorg/xwalk/core/R$string; at org.xwalk.core.XWalkDialogManager.showInitializationError(XWalkDialogManager.java:61) at org.xwalk.core.XWalkUpdater.updateXWalkRuntime(XWalkUpdater.java:138) at org.xwalk.core.XWalkActivityDelegate.onDockFailed(XWalkActivityDelegate.java:70) at org.xwalk.core.XWalkLibraryLoader$DockTask.onPostExecute(XWalkLibraryLoader.java:222) at org.xwalk.core.XWalkLibraryLoader$DockTask.onPostExecute(XWalkLibraryLoader.java:191) at android.os.AsyncTask.finish(AsyncTask.java:632) at android.os.AsyncTask.access$600(AsyncTask.java:177) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5972) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) Caused by: java.lang.ClassNotFoundException: Didn't find class "org.xwalk.core.R$string" on path: DexPathList[[zip file "/data/app/org.cocos2dx.LearnWorldTemplate-1/base.apk"],nativeLibraryDirectories=[/data/app/org.cocos2dx.LearnWorldTemplate-1/lib/arm, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469)             at org.xwalk.core.XWalkDialogManager.showInitializationError(XWalkDialogManager.java:61)             at org.xwalk.core.XWalkUpdater.updateXWalkRuntime(XWalkUpdater.java:138)             at org.xwalk.core.XWalkActivityDelegate.onDockFailed(XWalkActivityDelegate.java:70)             at org.xwalk.core.XWalkLibraryLoader$DockTask.onPostExecute(XWalkLibraryLoader.java:222)             at org.xwalk.core.XWalkLibraryLoader$DockTask.onPostExecute(XWalkLibraryLoader.java:191)             at android.os.AsyncTask.finish(AsyncTask.java:632)             at android.os.AsyncTask.access$600(AsyncTask.java:177)             at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:145)             at android.app.ActivityThread.main(ActivityThread.java:5972)             at java.lang.reflect.Method.invoke(Native Method)             at java.lang.reflect.Method.invoke(Method.java:372)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) Suppressed: java.lang.ClassNotFoundException: org.xwalk.core.R$string 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)
    via by Vivek Fitkariwala,
  • Impacted Cases ============== Reproduce Test Steps ==================== adb install -r out/Release/apks/XWalkRuntimeLib.apk adb install -r out/Release/apks/XWalkRuntimeClientShell.apk adb shell am start -n org.xwalk.runtime.client.shell/org.xwalk.runtime.client.shell.XWalkRuntimeClientShellActivity Expected Outcome ================ runtime shell start normally. Actual Outcome ============== I/ActivityManager( 570): Start proc 2608:org.xwalk.runtime.client.shell/u0a55 for activity org.xwalk.runtime.client.shell/.XWalkRuntimeClientShellActivity D/XWalkLib( 2608): Prepare to init core wrapper D/XWalkLib( 2608): DecompressTask started D/AndroidRuntime( 2608): Shutting down VM E/AndroidRuntime( 2608): FATAL EXCEPTION: main E/AndroidRuntime( 2608): Process: org.xwalk.runtime.client.shell, PID: 2608 E/AndroidRuntime( 2608): java.lang.NoClassDefFoundError: Failed resolution of: Lorg/xwalk/core/R$string; E/AndroidRuntime( 2608): at org.xwalk.core.XWalkDialogManager.showDecompressProgress(XWalkDialogManager.java:91) E/AndroidRuntime( 2608): at org.xwalk.core.XWalkActivityDelegate.onDecompressStarted(XWalkActivityDelegate.java:39) E/AndroidRuntime( 2608): at org.xwalk.core.XWalkLibraryLoader$DecompressTask.onPreExecute(XWalkLibraryLoader.java:232) E/AndroidRuntime( 2608): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:591) E/AndroidRuntime( 2608): at android.os.AsyncTask.execute(AsyncTask.java:539) E/AndroidRuntime( 2608): at org.xwalk.core.XWalkLibraryLoader.startDecompress(XWalkLibraryLoader.java:153) E/AndroidRuntime( 2608): at org.xwalk.core.XWalkActivityDelegate.initialize(XWalkActivityDelegate.java:33) E/AndroidRuntime( 2608): at org.xwalk.core.XWalkActivity.onResume(XWalkActivity.java:113) E/AndroidRuntime( 2608): at org.xwalk.app.XWalkRuntimeActivityBase.onResume(XWalkRuntimeActivityBase.java:59) E/AndroidRuntime( 2608): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257) E/AndroidRuntime( 2608): at android.app.Activity.performResume(Activity.java:6076) E/AndroidRuntime( 2608): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2975) E/AndroidRuntime( 2608): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3017) E/AndroidRuntime( 2608): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392) E/AndroidRuntime( 2608): at android.app.ActivityThread.access$800(ActivityThread.java:151) E/AndroidRuntime( 2608): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) E/AndroidRuntime( 2608): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 2608): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime( 2608): at android.app.ActivityThread.main(ActivityThread.java:5254) E/AndroidRuntime( 2608): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 2608): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime( 2608): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) E/AndroidRuntime( 2608): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) E/AndroidRuntime( 2608): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.xwalk.core.R$string" on path: DexPathList[[zip file "/data/app/org.xwalk.runtime.client.shell-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] E/AndroidRuntime( 2608): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) E/AndroidRuntime( 2608): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) E/AndroidRuntime( 2608): at java.lang.ClassLoader.loadClass(ClassLoader.java:469) E/AndroidRuntime( 2608): ... 23 more E/AndroidRuntime( 2608): Suppressed: java.lang.ClassNotFoundException: org.xwalk.core.R$string E/AndroidRuntime( 2608): at java.lang.Class.classForName(Native Method) E/AndroidRuntime( 2608): at java.lang.BootClassLoader.findClass(ClassLoader.java:781) E/AndroidRuntime( 2608): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) E/AndroidRuntime( 2608): at java.lang.ClassLoader.loadClass(ClassLoader.java:504) E/AndroidRuntime( 2608): ... 24 more E/AndroidRuntime( 2608): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available W/ActivityManager( 570): Force finishing activity 1 org.xwalk.runtime.client.shell/.XWalkRuntimeClientShellActivity Test Case Source Code ===================== Test Builds =========== Issue Analysis ==============
    via by Alex Chen,
  • I am trying to embed XWalkView inside Android project (ant build system). I have added Android webview (ARM) 14.43.343.17 as module inside the project and and trying to add XWalkView but getting this error. I have extended the activity as XWalkActivity as it is telling to using shared mode (though I am using Samsung Note 4 for testing which is arm based processor) This the log I am getting. Please help Process: org.cocos2dx.LearnWorldTemplate, PID: 12688 java.lang.NoClassDefFoundError: Failed resolution of: Lorg/xwalk/core/R$string; at org.xwalk.core.XWalkDialogManager.showInitializationError(XWalkDialogManager.java:61) at org.xwalk.core.XWalkUpdater.updateXWalkRuntime(XWalkUpdater.java:138) at org.xwalk.core.XWalkActivityDelegate.onDockFailed(XWalkActivityDelegate.java:70) at org.xwalk.core.XWalkLibraryLoader$DockTask.onPostExecute(XWalkLibraryLoader.java:222) at org.xwalk.core.XWalkLibraryLoader$DockTask.onPostExecute(XWalkLibraryLoader.java:191) at android.os.AsyncTask.finish(AsyncTask.java:632) at android.os.AsyncTask.access$600(AsyncTask.java:177) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5972) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) Caused by: java.lang.ClassNotFoundException: Didn't find class "org.xwalk.core.R$string" on path: DexPathList[[zip file "/data/app/org.cocos2dx.LearnWorldTemplate-1/base.apk"],nativeLibraryDirectories=[/data/app/org.cocos2dx.LearnWorldTemplate-1/lib/arm, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469)             at org.xwalk.core.XWalkDialogManager.showInitializationError(XWalkDialogManager.java:61)             at org.xwalk.core.XWalkUpdater.updateXWalkRuntime(XWalkUpdater.java:138)             at org.xwalk.core.XWalkActivityDelegate.onDockFailed(XWalkActivityDelegate.java:70)             at org.xwalk.core.XWalkLibraryLoader$DockTask.onPostExecute(XWalkLibraryLoader.java:222)             at org.xwalk.core.XWalkLibraryLoader$DockTask.onPostExecute(XWalkLibraryLoader.java:191)             at android.os.AsyncTask.finish(AsyncTask.java:632)             at android.os.AsyncTask.access$600(AsyncTask.java:177)             at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:145)             at android.app.ActivityThread.main(ActivityThread.java:5972)             at java.lang.reflect.Method.invoke(Native Method)             at java.lang.reflect.Method.invoke(Method.java:372)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) Suppressed: java.lang.ClassNotFoundException: org.xwalk.core.R$string 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)
    via by Vivek Fitkariwala,
  • Impacted Cases ============== Reproduce Test Steps ==================== adb install -r out/Release/apks/XWalkRuntimeLib.apk adb install -r out/Release/apks/XWalkRuntimeClientShell.apk adb shell am start -n org.xwalk.runtime.client.shell/org.xwalk.runtime.client.shell.XWalkRuntimeClientShellActivity Expected Outcome ================ runtime shell start normally. Actual Outcome ============== I/ActivityManager( 570): Start proc 2608:org.xwalk.runtime.client.shell/u0a55 for activity org.xwalk.runtime.client.shell/.XWalkRuntimeClientShellActivity D/XWalkLib( 2608): Prepare to init core wrapper D/XWalkLib( 2608): DecompressTask started D/AndroidRuntime( 2608): Shutting down VM E/AndroidRuntime( 2608): FATAL EXCEPTION: main E/AndroidRuntime( 2608): Process: org.xwalk.runtime.client.shell, PID: 2608 E/AndroidRuntime( 2608): java.lang.NoClassDefFoundError: Failed resolution of: Lorg/xwalk/core/R$string; E/AndroidRuntime( 2608): at org.xwalk.core.XWalkDialogManager.showDecompressProgress(XWalkDialogManager.java:91) E/AndroidRuntime( 2608): at org.xwalk.core.XWalkActivityDelegate.onDecompressStarted(XWalkActivityDelegate.java:39) E/AndroidRuntime( 2608): at org.xwalk.core.XWalkLibraryLoader$DecompressTask.onPreExecute(XWalkLibraryLoader.java:232) E/AndroidRuntime( 2608): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:591) E/AndroidRuntime( 2608): at android.os.AsyncTask.execute(AsyncTask.java:539) E/AndroidRuntime( 2608): at org.xwalk.core.XWalkLibraryLoader.startDecompress(XWalkLibraryLoader.java:153) E/AndroidRuntime( 2608): at org.xwalk.core.XWalkActivityDelegate.initialize(XWalkActivityDelegate.java:33) E/AndroidRuntime( 2608): at org.xwalk.core.XWalkActivity.onResume(XWalkActivity.java:113) E/AndroidRuntime( 2608): at org.xwalk.app.XWalkRuntimeActivityBase.onResume(XWalkRuntimeActivityBase.java:59) E/AndroidRuntime( 2608): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257) E/AndroidRuntime( 2608): at android.app.Activity.performResume(Activity.java:6076) E/AndroidRuntime( 2608): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2975) E/AndroidRuntime( 2608): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3017) E/AndroidRuntime( 2608): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392) E/AndroidRuntime( 2608): at android.app.ActivityThread.access$800(ActivityThread.java:151) E/AndroidRuntime( 2608): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) E/AndroidRuntime( 2608): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 2608): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime( 2608): at android.app.ActivityThread.main(ActivityThread.java:5254) E/AndroidRuntime( 2608): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 2608): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime( 2608): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) E/AndroidRuntime( 2608): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) E/AndroidRuntime( 2608): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.xwalk.core.R$string" on path: DexPathList[[zip file "/data/app/org.xwalk.runtime.client.shell-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] E/AndroidRuntime( 2608): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) E/AndroidRuntime( 2608): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) E/AndroidRuntime( 2608): at java.lang.ClassLoader.loadClass(ClassLoader.java:469) E/AndroidRuntime( 2608): ... 23 more E/AndroidRuntime( 2608): Suppressed: java.lang.ClassNotFoundException: org.xwalk.core.R$string E/AndroidRuntime( 2608): at java.lang.Class.classForName(Native Method) E/AndroidRuntime( 2608): at java.lang.BootClassLoader.findClass(ClassLoader.java:781) E/AndroidRuntime( 2608): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) E/AndroidRuntime( 2608): at java.lang.ClassLoader.loadClass(ClassLoader.java:504) E/AndroidRuntime( 2608): ... 24 more E/AndroidRuntime( 2608): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available W/ActivityManager( 570): Force finishing activity 1 org.xwalk.runtime.client.shell/.XWalkRuntimeClientShellActivity Test Case Source Code ===================== Test Builds =========== Issue Analysis ==============
    via by Alex Chen,
  • Exception with Graph Generator Listener
    via by Testing Forum,
  • Exception with Graphs Generator
    via Stack Overflow by Tarun
    ,
    • java.lang.ClassNotFoundException: org.xwalk.core.R$string 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 UserUnknown User
    2 times, last one,
    Hiren AmaliyarHiren Amaliyar
    2 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    1898 more bugmates