java.lang.NoClassDefFoundError

javax/microedition/khronos/opengles/GL

Samebug tips8

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.


rafaelrafael

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.


rafaelrafael

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

Solutions on the web12855

  • via GitHub by karlicoss
    ,
  • Stack trace

    • java.lang.NoClassDefFoundError: javax/microedition/khronos/opengles/GL at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.getDeclaredMethod(Class.java:2128) at org.robolectric.util.ReflectionHelpers.callStaticMethod(ReflectionHelpers.java:224) at org.robolectric.internal.bytecode.RobolectricInternals.performStaticInitialization(RobolectricInternals.java:54) at org.robolectric.internal.bytecode.ShadowWrangler.classInitializing(ShadowWrangler.java:114) at org.robolectric.internal.bytecode.RobolectricInternals.classInitializing(RobolectricInternals.java:18) at android.graphics.Canvas.<clinit>(Canvas.java) at android.view.View.__constructor__(View.java:3804) at android.view.View.<init>(View.java) at android.view.ViewGroup.<init>(ViewGroup.java) at android.widget.FrameLayout.<init>(FrameLayout.java) at com.android.internal.policy.PhoneWindow$DecorView.<init>(PhoneWindow.java) at com.android.internal.policy.PhoneWindow.generateDecor(PhoneWindow.java:3630) at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:3973) at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:1969) at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:363) at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:312) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:277) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.sheypoor.mobile.mvp.ui.LoginRegisterActivity.onCreate(LoginRegisterActivity.java:43) at android.app.Activity.performCreate(Activity.java:6237) at org.robolectric.util.ReflectionHelpers.callInstanceMethod(ReflectionHelpers.java:195) at org.robolectric.util.ActivityController$1.run(ActivityController.java:126) at org.robolectric.shadows.ShadowLooper.runPaused(ShadowLooper.java:340) at org.robolectric.shadows.CoreShadowsAdapter$2.runPaused(CoreShadowsAdapter.java:40) at org.robolectric.util.ActivityController.create(ActivityController.java:123) at org.robolectric.util.ActivityController.create(ActivityController.java:133) at org.robolectric.util.ActivityController.setup(ActivityController.java:227) at org.robolectric.Robolectric.setupActivity(Robolectric.java:96) at com.sheypoor.mobile.LoginRegisterActivityTest.setUp(LoginRegisterActivityTest.java:32) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:248) at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:174) at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:63) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:140) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: java.lang.ClassNotFoundException: javax.microedition.khronos.opengles.GL at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.robolectric.internal.bytecode.InstrumentingClassLoader.loadClass(InstrumentingClassLoader.java:124) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.getDeclaredMethod(Class.java:2128) at org.robolectric.util.ReflectionHelpers.callStaticMethod(ReflectionHelpers.java:224) at org.robolectric.internal.bytecode.RobolectricInternals.performStaticInitialization(RobolectricInternals.java:54) at org.robolectric.internal.bytecode.ShadowWrangler.classInitializing(ShadowWrangler.java:114) at org.robolectric.internal.bytecode.RobolectricInternals.classInitializing(RobolectricInternals.java:18) at android.graphics.Canvas.<clinit>(Canvas.java) at android.view.View.$$robo$$__constructor__(View.java:3804) at android.view.View.<init>(View.java) at android.view.View.<init>(View.java) at android.view.ViewGroup.<init>(ViewGroup.java) at android.view.ViewGroup.<init>(ViewGroup.java) at android.view.ViewGroup.<init>(ViewGroup.java) at android.view.ViewGroup.<init>(ViewGroup.java) at android.widget.FrameLayout.<init>(FrameLayout.java) at com.android.internal.policy.PhoneWindow$DecorView.<init>(PhoneWindow.java) at com.android.internal.policy.PhoneWindow.$$robo$$generateDecor(PhoneWindow.java:3630) at com.android.internal.policy.PhoneWindow.generateDecor(PhoneWindow.java) at com.android.internal.policy.PhoneWindow.$$robo$$installDecor(PhoneWindow.java:3973) at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java) at com.android.internal.policy.PhoneWindow.$$robo$$getDecorView(PhoneWindow.java:1969) at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java) at android.support.v7.app.AppCompatDelegateImplV7.$$robo$$createSubDecor(AppCompatDelegateImplV7.java:363) at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java) at android.support.v7.app.AppCompatDelegateImplV7.$$robo$$ensureSubDecor(AppCompatDelegateImplV7.java:312) at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java) at android.support.v7.app.AppCompatDelegateImplV7.$$robo$$setContentView(AppCompatDelegateImplV7.java:277) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java) at android.support.v7.app.AppCompatActivity.$$robo$$setContentView(AppCompatActivity.java:140) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java) at com.sheypoor.mobile.mvp.ui.LoginRegisterActivity.onCreate(LoginRegisterActivity.java:43) at android.app.Activity.$$robo$$performCreate(Activity.java:6237) at android.app.Activity.performCreate(Activity.java) 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 org.robolectric.util.ReflectionHelpers.callInstanceMethod(ReflectionHelpers.java:195) at org.robolectric.util.ActivityController$1.run(ActivityController.java:126) at org.robolectric.shadows.ShadowLooper.runPaused(ShadowLooper.java:340) at org.robolectric.shadows.CoreShadowsAdapter$2.runPaused(CoreShadowsAdapter.java:40) at org.robolectric.util.ActivityController.create(ActivityController.java:123) at org.robolectric.util.ActivityController.create(ActivityController.java:133) at org.robolectric.util.ActivityController.setup(ActivityController.java:227) at org.robolectric.Robolectric.setupActivity(Robolectric.java:96) at com.sheypoor.mobile.LoginRegisterActivityTest.setUp(LoginRegisterActivityTest.java:32) 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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:248) at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:174) at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:63) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:140) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) 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) ... 1 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

    Unknown visitor
    Unknown visitorOnce,
    mauritiusmauritius
    17 times, last one
    Unknown visitor
    Unknown visitorOnce,
    AxeloAxelo
    2 times, last one
    MattyMatty
    Once,
    2420 more bugmates