org.powermock.reflect.exceptions.TooManyFieldsFoundException: Two or more fields matching type java.lang.String.

Google Groups | Matt Lachman | 4 years ago
  1. 0

    Re: [powermock] TooManyFieldsFoundException instead of MockitoAssertionError when using verifyStatic

    Google Groups | 4 years ago | Matt Lachman
    org.powermock.reflect.exceptions.TooManyFieldsFoundException: Two or more fields matching type java.lang.String.
  2. 0

    TooManyFieldsFoundException when using PowerMock with IBM JRE

    GitHub | 1 year ago | johanhaleby
    org.powermock.reflect.exceptions.TooManyFieldsFoundException: Two or more fields matching type java.lang.String.
  3. 0

    TooManyFieldsFoundException when using PowerMock with IBM JRE

    GitHub | 2 years ago | GoogleCodeExporter
    org.powermock.reflect.exceptions.TooManyFieldsFoundException: Two or more fields matching type java.lang.String.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Getting IllegalArgumentException with JavaAssist:PowerMock+TestNG+Mockito

    Google Groups | 7 years ago | Kartik Kumar
    org.powermock.reflect.exceptions.TooManyFieldsFoundException: Two or more fields matching type java.lang.String.

    2 unregistered visitors

    Root Cause Analysis

    1. org.powermock.reflect.exceptions.TooManyFieldsFoundException

      Two or more fields matching type java.lang.String.

      at org.powermock.reflect.internal.WhiteboxImpl.findSingleFieldUsingStrategy()
    2. powermock-reflect
      Whitebox.setInternalState
      1. org.powermock.reflect.internal.WhiteboxImpl.findSingleFieldUsingStrategy(WhiteboxImpl.java:496)
      2. org.powermock.reflect.internal.WhiteboxImpl.findFieldInHierarchy(WhiteboxImpl.java:455)
      3. org.powermock.reflect.internal.WhiteboxImpl.setInternalState(WhiteboxImpl.java:327)
      4. org.powermock.reflect.Whitebox.setInternalState(Whitebox.java:207)
      4 frames
    3. org.powermock.api
      MockitoMethodInvocationControl.invoke
      1. org.powermock.api.mockito.internal.invocationcontrol.InvocationControlAssertionError.updateErrorMessageForMethodInvocation(InvocationControlAssertionError.java:75)
      2. org.powermock.api.mockito.internal.invocationcontrol.MockitoMethodInvocationControl.performIntercept(MockitoMethodInvocationControl.java:300)
      3. org.powermock.api.mockito.internal.invocationcontrol.MockitoMethodInvocationControl.invoke(MockitoMethodInvocationControl.java:194)
      3 frames
    4. powermock-core
      MockGateway.methodCall
      1. org.powermock.core.MockGateway.doMethodCall(MockGateway.java:105)
      2. org.powermock.core.MockGateway.methodCall(MockGateway.java:60)
      2 frames
    5. cn.ca.spike
      StationServiceTestPower2.testStatic
      1. cn.ca.spike.station.StationCacheStatic.getStation(StationCacheStatic.java)
      2. cn.ca.spike.station.StationServiceTestPower2.testStatic(StationServiceTestPower2.java:81)
      2 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      4. java.lang.reflect.Method.invoke(Method.java:611)
      4 frames
    7. JUnit
      TestMethod.invoke
      1. org.junit.internal.runners.TestMethod.invoke(TestMethod.java:66)
      1 frame
    8. powermock-module-junit4
      PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod
      1. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:312)
      1 frame
    9. JUnit
      MethodRoadie.runBeforesThenTestThenAfters
      1. org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86)
      2. org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:94)
      2 frames
    10. powermock-module-junit4
      PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters
      1. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:296)
      2. org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:112)
      3. org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:73)
      4. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:284)
      4 frames
    11. JUnit
      MethodRoadie.run
      1. org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
      2. org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
      2 frames
    12. powermock-module-junit4
      PowerMockJUnit44RunnerDelegateImpl$1.run
      1. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:209)
      2. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:148)
      3. org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:122)
      3 frames
    13. JUnit
      ClassRoadie.runProtected
      1. org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
      2. org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
      2 frames