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(MockClassLoader.java: 208) at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java: 146) at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java: 65)

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

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

Solutions on the web22554

  • Failed to transform class with name com.example.TestEntity. Reason: bad array type for AALOAD: null at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java: 208) at
  • via Google Groups by Graham Polley, 1 year ago
    Failed to transform class with name [CLASS_NAME_HERE]. Reason: PowerMock internal error when modifying field. at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java: 207) at
  • Failed to transform class with name > com.example.MyTest. Reason: 3 at > org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoade r.java: > 208) at > org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassL oader.java: > 146) at > org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSu pportingClassLoader.java: > 63)
  • Stack trace

    • 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(MockClassLoader.java: 208) at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java: 146) at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java: 65) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethods(Class.java:1791)

    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

    You’re the first here who have seen this exception.