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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Google Groups by Matt Lachman, 1 year ago
via GitHub by GoogleCodeExporter
, 2 years ago
Two or more fields matching type java.lang.String.
via GitHub by johanhaleby
, 2 years ago
Two or more fields matching type java.lang.String.
via Google Groups by Kartik Kumar, 2 years ago
Two or more fields matching type java.lang.String.
via Stack Overflow by Arindam Goswami
, 7 months ago
Two or more fields matching type $javax.ws.rs.client.Client$$EnhancerByMockitoWithCGLIB$$20e30d22.
org.powermock.reflect.exceptions.TooManyFieldsFoundException: Two or more fields matching type java.lang.String.
at org.powermock.reflect.internal.WhiteboxImpl.findSingleFieldUsingStrategy(WhiteboxImpl.java:496)
at org.powermock.reflect.internal.WhiteboxImpl.findFieldInHierarchy(WhiteboxImpl.java:455)
at org.powermock.reflect.internal.WhiteboxImpl.setInternalState(WhiteboxImpl.java:327)
at org.powermock.api.mockito.internal.invocationcontrol.InvocationControlAssertionError.updateErrorMessageForMethodInvocation(InvocationControlAssertionError.java:75)
at org.powermock.api.mockito.internal.invocationcontrol.MockitoMethodInvocationControl.performIntercept(MockitoMethodInvocationControl.java:300)
at org.powermock.api.mockito.internal.invocationcontrol.MockitoMethodInvocationControl.invoke(MockitoMethodInvocationControl.java:194)
at org.powermock.core.MockGateway.doMethodCall(MockGateway.java:105)
at cn.ca.spike.station.StationCacheStatic.getStation(StationCacheStatic.java)
at cn.ca.spike.station.StationServiceTestPower2.testStatic(StationServiceTestPower2.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:296)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:112)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:73)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:209)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:148)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Know the solutions? Share your knowledge to help other developers to debug faster.