java.lang.IllegalArgumentException: Cannot subclass final class class com.github.fge.jsonschema.main.JsonSchemaFactory

Google Groups | Scott DeWitt | 11 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    PowerMock with EasyMock can only mock final classes in the java.* space?

    Google Groups | 11 months ago | Scott DeWitt
    java.lang.IllegalArgumentException: Cannot subclass final class class com.github.fge.jsonschema.main.JsonSchemaFactory

    1 unregistered visitors

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Cannot subclass final class class com.github.fge.jsonschema.main.JsonSchemaFactory

      at org.easymock.cglib.proxy.Enhancer.generateClass()
    2. org.easymock.cglib
      Enhancer.createClass
      1. org.easymock.cglib.proxy.Enhancer.generateClass(Enhancer.java:446)
      2. org.easymock.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
      3. org.easymock.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
      4. org.easymock.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
      5. org.easymock.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
      5 frames
    3. EasyMock
      MocksControl.createMock
      1. org.easymock.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:175)
      2. org.easymock.internal.MocksControl.createMock(MocksControl.java:113)
      3. org.easymock.internal.MocksControl.createMock(MocksControl.java:94)
      3 frames
    4. powermock-api-easymock
      PowerMock.createMock
      1. org.powermock.api.easymock.PowerMock.doCreateMock(PowerMock.java:1998)
      2. org.powermock.api.easymock.PowerMock.doMock(PowerMock.java:1945)
      3. org.powermock.api.easymock.PowerMock.createMock(PowerMock.java:85)
      3 frames
    5. com.ibm.cio
      JsonSchemaValidatorTest.testJsonSchemaValidatorFailures
      1. com.ibm.cio.ecm.common.jsonschema.test.JsonSchemaValidatorTest.testJsonSchemaValidatorFailures(JsonSchemaValidatorTest.java:122)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    7. JUnit
      ParentRunner.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.InvokeMethod.evaluate(InvokeMethod.java:17)
      5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      6. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      8. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      9. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      10. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      11. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      12. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      13. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      14. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      14 frames
    8. JUnit4 Runner
      JUnit4TestReference.run
      1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
      1 frame
    9. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
      5 frames