title: PowerMockRunner causes ExceptionInInitializerError when running trivial test
body: <p>I cannot run a very simple test class using the Powermock test runnner.  It causes an ExceptionInInitializerError.  It looks to be a problem with the dependencies on the classpath, however, I have tried a few variants of the dependency versions, but all of them cause the same error.  How can I get this simple test to pass when using the Powermock test runner?</p>
  
  <p>The test code:</p>
  
  <pre><code>package net.solasistim.hello;
  
  import org.junit.Test;
  import org.junit.Assert;
  import org.junit.runner.RunWith;
  import org.powermock.modules.junit4.PowerMockRunner;
  
  @RunWith(PowerMockRunner.class)
  public class HelloTest {
      @Test
      public void testMain() {
          Assert.assertTrue(true);
      }
  } 
  </code></pre>
  
  <p>Project POM:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;project&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;net.solasistim.hello&lt;/groupId&gt;
    &lt;artifactId&gt;hello&lt;/artifactId&gt;
    &lt;version&gt;1&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
    &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;powermock.version&gt;1.5&lt;/powermock.version&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;4.11&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
     &lt;dependency&gt;
        &lt;groupId&gt;org.powermock&lt;/groupId&gt;
        &lt;artifactId&gt;powermock-module-junit4&lt;/artifactId&gt;
        &lt;version&gt;${powermock.version}&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
     &lt;/dependency&gt;
     &lt;dependency&gt;
        &lt;groupId&gt;org.powermock&lt;/groupId&gt;
        &lt;artifactId&gt;powermock-api-easymock&lt;/artifactId&gt;
        &lt;version&gt;${powermock.version}&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
     &lt;/dependency&gt;  
     &lt;dependency&gt;
        &lt;groupId&gt;cglib&lt;/groupId&gt;
        &lt;artifactId&gt;cglib&lt;/artifactId&gt;
        &lt;version&gt;3.0&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
     &lt;/dependency&gt;  
     &lt;dependency&gt;
        &lt;groupId&gt;org.ow2.asm&lt;/groupId&gt;
        &lt;artifactId&gt;asm&lt;/artifactId&gt;
        &lt;version&gt;4.1&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
     &lt;/dependency&gt;  
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Running <code>mvn clean compile test</code> causes the following output:</p>
  
  <pre class="lang-none prettyprint-override"><code>-------------------------------------------------------------------------------
  Test set: net.solasistim.hello.HelloTest
  -------------------------------------------------------------------------------
  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.097 sec &lt;&lt;&lt; FAILURE!
  initializationError(net.solasistim.hello.HelloTest)  Time elapsed: 0.007 sec  &lt;&lt;&lt; ERROR!
  java.lang.ExceptionInInitializerError
          at org.powermock.api.extension.proxyframework.ProxyFrameworkImpl.isProxy(ProxyFrameworkImpl.java:29)
          at org.powermock.reflect.internal.WhiteboxImpl.getUnmockedType(WhiteboxImpl.java:1783)
          at org.powermock.reflect.internal.WhiteboxImpl.getType(WhiteboxImpl.java:2237)
          at org.powermock.reflect.internal.WhiteboxImpl.checkArgumentTypesMatchParameterTypes(WhiteboxImpl.java:2191)
          at org.powermock.reflect.internal.WhiteboxImpl.findMethodOrThrowException(WhiteboxImpl.java:938)
          at org.powermock.reflect.internal.WhiteboxImpl.doInvokeMethod(WhiteboxImpl.java:882)
          at org.powermock.reflect.internal.WhiteboxImpl.invokeMethod(WhiteboxImpl.java:859)
          at org.powermock.reflect.Whitebox.invokeMethod(Whitebox.java:466)
          at org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.registerProxyframework(AbstractTestSuiteChunkerImpl.java:154)
          at org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.getPowerMockTestListenersLoadedByASpecificClassLoader(AbstractTestSuiteChunkerImpl.java:107)
          at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:143)
          at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:39)
          at org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.createTestDelegators(AbstractTestSuiteChunkerImpl.java:217)
          at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.&lt;init&gt;(JUnit4TestSuiteChunkerImpl.java:59)
          at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.&lt;init&gt;(AbstractCommonPowerMockRunner.java:32)
          at org.powermock.modules.junit4.PowerMockRunner.&lt;init&gt;(PowerMockRunner.java:33)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
          at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
          at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
          at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
          at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)
          at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:51)
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
          at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
          at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
          at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
          at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
          at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
  Caused by: java.lang.IllegalArgumentException
          at org.objectweb.asm.ClassVisitor.&lt;init&gt;(Unknown Source)
          at net.sf.cglib.core.DebuggingClassWriter.&lt;init&gt;(DebuggingClassWriter.java:49)
          at net.sf.cglib.core.DefaultGeneratorStrategy.getClassVisitor(DefaultGeneratorStrategy.java:30)
          at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:24)
          at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
          at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:144)
          at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:116)
          at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
          at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
          at net.sf.cglib.proxy.Enhancer.&lt;clinit&gt;(Enhancer.java:69)
          ... 38 more
  </code></pre>