org.mockito.exceptions.base.MockitoException: Mockito cannot mock this class: class java.nio.DirectByteBuffer Mockito can only mock visible & non-final classes. If you're not sure why you're getting this error, please report to the mailing list.

Google Groups | Alexander Pelepeychenko | 1 year ago
  1. 0

    Howto add spy to MappedByteBuffer?

    Google Groups | 1 year ago | Alexander Pelepeychenko
    org.mockito.exceptions.base.MockitoException: Mockito cannot mock this class: class java.nio.DirectByteBuffer Mockito can only mock visible & non-final classes. If you're not sure why you're getting this error, please report to the mailing list.
  2. 0

    java.lang.IllegalAccessError while running Mockito from SBT

    renren.io | 1 year ago
    org.mockito.exceptions.base.MockitoException: Mockito cannot mock this class: interface com.example.Consumer$Input Mockito can only mock visible & non-final classes. If you're not sure why you're getting this error, please report to the mailing list.
  3. 0

    java.lang.IllegalAccessError while running Mockito from SBT

    Stack Overflow | 3 years ago | Andrey
    org.mockito.exceptions.base.MockitoException: Mockito cannot mock this class: interface com.example.Consumer$Input Mockito can only mock visible & non-final classes. If you're not sure why you're getting this error, please report to the mailing list.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ProcessAccessException occurred inside Setter with Hibernate Search

    Stack Overflow | 3 years ago | Wasif Kirmani
    org.hibernate.PropertyAccessException: Exception occurred inside setter of com.bo.Sample.logEvents
  6. 0

    Yarn/ hdfs attempting to use kerberos when security is disabled

    Stack Overflow | 1 year ago | javadba
    java.lang.IllegalArgumentException: Can't get Kerberos realm

  1. r1chjames 1 times, last 1 day ago
  2. bmacedo 8 times, last 3 weeks ago
  3. aldrinleal 1 times, last 1 month ago
  4. ajinkya_w 96 times, last 2 months ago
  5. davidvanlaatum 4 times, last 2 months ago
18 more registered users
77 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalAccessError

    class $java.nio. DirectByteBuffer$$EnhancerByMockitoWithCGLIB$$d5fb8f36 cannot access its superclass java.nio.DirectByteBuffer

    at java.lang.ClassLoader.defineClass1()
  2. Java RT
    Method.invoke
    1. java.lang.ClassLoader.defineClass1(Native Method)
    2. java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    3. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    4. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    5. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    6. java.lang.reflect.Method.invoke(Method.java:497)
    6 frames
  3. Mockito
    Enhancer.createClass
    1. org.mockito.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:385)
    2. org.mockito.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:220)
    3. org.mockito.cglib.proxy.Enhancer.createHelper(Enhancer.java:378)
    4. org.mockito.cglib.proxy.Enhancer.createClass(Enhancer.java:318)
    4 frames
  4. org.powermock.api
    ClassImposterizer.imposterise
    1. org.powermock.api.mockito.repackaged.ClassImposterizer.createProxyClass(ClassImposterizer.java:123)
    2. org.powermock.api.mockito.repackaged.ClassImposterizer.imposterise(ClassImposterizer.java:57)
    2 frames
  5. powermock-api-mockito
    PowerMockito.spy
    1. org.powermock.api.mockito.internal.mockcreation.MockCreator.createMethodInvocationControl(MockCreator.java:111)
    2. org.powermock.api.mockito.internal.mockcreation.MockCreator.mock(MockCreator.java:59)
    3. org.powermock.api.mockito.PowerMockito.spy(PowerMockito.java:220)
    3 frames
  6. misat.rounddb
    EnsurePowerMockTest.addSpyTest
    1. misat.rounddb.EnsurePowerMockTest.addSpyTest(EnsurePowerMockTest.java:34)
    1 frame
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  8. TestNG
    RemoteTestNGStarter.main
    1. org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
    2. org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
    3. org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
    4. org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
    5. org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
    6. org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
    7. org.testng.TestRunner.privateRun(TestRunner.java:774)
    8. org.testng.TestRunner.run(TestRunner.java:624)
    9. org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
    10. org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
    11. org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
    12. org.testng.SuiteRunner.run(SuiteRunner.java:261)
    13. org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    14. org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    15. org.testng.TestNG.runSuitesSequentially(TestNG.java:1191)
    16. org.testng.TestNG.runSuitesLocally(TestNG.java:1116)
    17. org.testng.TestNG.run(TestNG.java:1024)
    18. org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
    19. org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
    20. org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
    21. org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:125)
    21 frames
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  10. IDEA
    AppMain.main
    1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
    1 frame