java.lang.IllegalStateException: Failed to transform class with name com.example.TestEntity. Reason: bad array type for AALOAD: null

Google Groups | ruben | 6 years ago
  1. 0

    surefire + powermock = java.lang.IllegalStateException: Failed to transform class with name ... Reason: bad array type for AALOAD: null

    Google Groups | 6 years ago | ruben
    java.lang.IllegalStateException: Failed to transform class with name com.example.TestEntity. Reason: bad array type for AALOAD: null
  2. 0

    powermockito.mockstatic not working when build using Ant

    Stack Overflow | 11 months ago | PKS
    java.lang.IllegalStateException: Failed to transform class with name com.Utils$UserEnum. Reason: null
  3. 0

    Junit test with powermock gives initialization error via eclipse but runs through command line

    Stack Overflow | 3 years ago | user3642013
    java.lang.IllegalStateException: Failed to transform class with name com.paychex.mobile.remote.ReportingMobileRemoteTest. Reason: Invalid index
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 392#124561756

    GitHub | 1 year ago | johanhaleby
    java.lang.IllegalStateException: Failed to transform class with name YY. Reason: javassist.bytecode.StringInfo cannot be cast to javassist.bytecode.MethodrefInfo

    5 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.IllegalStateException

      Failed to transform class with name com.example.TestEntity. Reason: bad array type for AALOAD: null

      at org.powermock.core.classloader.MockClassLoader.loadMockClass()
    2. powermock-core
      DeferSupportingClassLoader.loadClass
      1. org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:208)
      2. org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:146)
      3. org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:65)
      3 frames
    3. Java RT
      Class.getDeclaredMethods
      1. java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      2. java.lang.Class.getDeclaredMethods0(Native Method)
      3. java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
      4. java.lang.Class.getDeclaredMethods(Class.java:1791)
      4 frames
    4. JUnit
      MethodValidator.validateMethodsForDefaultRunner
      1. org.junit.internal.runners.TestClass.getAnnotatedMethods(TestClass.java:44)
      2. org.junit.internal.runners.MethodValidator.validateTestMethods(MethodValidator.java:69)
      3. org.junit.internal.runners.MethodValidator.validateStaticMethods(MethodValidator.java:43)
      4. org.junit.internal.runners.MethodValidator.validateMethodsForDefaultRunner(MethodValidator.java:49)
      4 frames
    5. powermock-module-junit4
      PowerMockJUnit47RunnerDelegateImpl.<init>
      1. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.validate(PowerMockJUnit44RunnerDelegateImpl.java:123)
      2. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.<init>(PowerMockJUnit44RunnerDelegateImpl.java:85)
      3. org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl.<init>(PowerMockJUnit47RunnerDelegateImpl.java:42)
      3 frames
    6. Java RT
      Constructor.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      4. java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      4 frames
    7. powermock-module-junit4-common
      JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader
      1. org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:154)
      2. org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:49)
      2 frames
    8. powermock-core
      AbstractTestSuiteChunkerImpl.createTestDelegators
      1. org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.createTestDelegators(AbstractTestSuiteChunkerImpl.java:231)
      1 frame
    9. powermock-module-junit4-common
      AbstractCommonPowerMockRunner.<init>
      1. org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.<init>(JUnit4TestSuiteChunkerImpl.java:69)
      2. org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.<init>(AbstractCommonPowerMockRunner.java:36)
      2 frames
    10. powermock-module-junit4
      PowerMockRunner.<init>
      1. org.powermock.modules.junit4.PowerMockRunner.<init>(PowerMockRunner.java:27)
      1 frame
    11. Java RT
      Constructor.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      4. java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      4 frames
    12. JUnit
      ClassRequest.getRunner
      1. org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
      2. org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
      3. org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
      4. org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
      5. org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
      6. org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
      6 frames
    13. JUnit4 Provider
      JUnit4DirectoryTestSuite.createTestSet
      1. org.apache.maven.surefire.junit4.JUnit4TestSet.<init>(JUnit4TestSet.java:45)
      2. org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56)
      2 frames