java.lang.IllegalArgumentException: Not a mock: $javax.servlet.jsp.PageContext$$EnhancerByCGLIB$$7891ed10

Stack Overflow | karan | 3 months ago
  1. 0

    java.lang.IllegalArgumentException: Not a mock: $javax.servlet.jsp.PageContext

    Stack Overflow | 3 months ago | karan
    java.lang.IllegalArgumentException: Not a mock: $javax.servlet.jsp.PageContext$$EnhancerByCGLIB$$7891ed10
  2. 0

    Mocking InetAddress - how to mock getting a new local address?

    Google Groups | 6 years ago | Martin
    java.lang.IllegalArgumentException: Not a mock: java.lang.Class
  3. 0

    java.lang.IllegalArgumentException: Not a mock: java.lang.Class on PowerMock and EasyMock

    Stack Overflow | 1 year ago | Walter
    java.lang.IllegalArgumentException: Not a mock: java.lang.Class
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Powermock (With Easymock) no last call on a mock available

    Stack Overflow | 3 years ago | Cameron Jones
    java.lang.IllegalArgumentException: Not a mock: java.lang.Class
  6. 0

    Easy mock does not recognize mocked service

    Stack Overflow | 5 years ago | sebi
    java.lang.IllegalArgumentException: Not a mock: $Proxy43

    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.IllegalArgumentException

      Not a mock: $javax.servlet.jsp.PageContext$$EnhancerByCGLIB$$7891ed10

      at org.easymock.classextension.internal.ClassExtensionHelper.getControl()
    2. EasyMock Class extension
      EasyMock.replay
      1. org.easymock.classextension.internal.ClassExtensionHelper.getControl(ClassExtensionHelper.java:62)
      2. org.easymock.classextension.EasyMock.replay(EasyMock.java:181)
      2 frames
    3. com.test.web
      SampleTest.setup
      1. com.test.web.tag.SampleTest.setup(SampleTest.java:46)
      1 frame
    4. 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
    5. JUnit
      JUnitCore.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      4. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
      5. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      6. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      8. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      9. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      10. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      11. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      12. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      13. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      14. org.junit.runners.Suite.runChild(Suite.java:128)
      15. org.junit.runners.Suite.runChild(Suite.java:27)
      16. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      17. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      18. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      19. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      20. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      21. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      22. org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      23. org.junit.runner.JUnitCore.run(JUnitCore.java:115)
      23 frames
    6. SureFire JUnitCore Runner
      JUnitCoreProvider.invoke
      1. org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:62)
      2. org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:139)
      2 frames
    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. SureFire
      ForkedBooter.main
      1. org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
      2. org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
      3. org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
      4. org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:104)
      5. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
      5 frames