Powermock: Powermock 1.7.3 incompatible with Mockito > 2.8.47

Created on 8 Nov 2017  Â·  3Comments  Â·  Source: powermock/powermock

Calls to mockStatic result in

java.lang.NoSuchMethodError: org.mockito.internal.handler.MockHandlerFactory.createMockHandler(Lorg/mockito/mock/MockCreationSettings;)Lorg/mockito/internal/InternalMockHandler;
        at org.powermock.api.mockito.internal.mockcreation.DefaultMockCreator.createMethodInvocationControl(DefaultMockCreator.java:114)
        at org.powermock.api.mockito.internal.mockcreation.DefaultMockCreator.createMock(DefaultMockCreator.java:69)
        at org.powermock.api.mockito.internal.mockcreation.DefaultMockCreator.mock(DefaultMockCreator.java:46)
        at org.powermock.api.mockito.PowerMockito.mockStatic(PowerMockito.java:73)

Also mentioned here

https://github.com/mockito/mockito/issues/1207

Cannot be fixed

Most helpful comment

Supporting of Mockito 2.x is experimental and will not be continued in future.
As it mentioned in the mockito/mockito#1207, Mockito provided a new public API for PowerMock and PowerMock will support only version upper than 2.10.0.
I have updated wiki page to avoid misunderstanding.
So if you need supporting of Mockito > 2.8.9 you may try to use PowerMock 2 beta.

All 3 comments

Supporting of Mockito 2.x is experimental and will not be continued in future.
As it mentioned in the mockito/mockito#1207, Mockito provided a new public API for PowerMock and PowerMock will support only version upper than 2.10.0.
I have updated wiki page to avoid misunderstanding.
So if you need supporting of Mockito > 2.8.9 you may try to use PowerMock 2 beta.

@thekingnothing Given that this issue was closed a year ago, is there any plan to release PowerMock 2 beta - or any version of PowerMock that supports current version of Mockito 2 (v2.23.0 as of today, Nov 20, 2018)?

There is several PowerMock 2.0 releases candidate version are available in Maven Central.

Best Regards,
Artur Zagretdinov

On 20 Nov 2018, at 22:39, Charlie Reitzel <[email protected]notifications@github.com> wrote:

@thekingnothinghttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fthekingnothing&data=02%7C01%7C%7C9c3db8b8836b432a4df408d64f3916d4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636783503939047164&sdata=o46WTPHFiRzCdjLZp9EYgPnbNMkU8wVoSDlJCvfPZXQ%3D&reserved=0 Given that this issue was closed a year ago, is there any plan to release PowerMock 2 beta - or any version of PowerMock that supports current version of Mockito 2 (v2.23.0 as of today, Nov 20, 2018)?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpowermock%2Fpowermock%2Fissues%2F867%23issuecomment-440454869&data=02%7C01%7C%7C9c3db8b8836b432a4df408d64f3916d4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636783503939047164&sdata=oarnZvOQ7zs2lu8KFg1mUS2ALXU36ywQVZLlbzRy8cw%3D&reserved=0, or mute the threadhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMkKANeLnI-OmjPdFAugm9Z072zEqD5uks5uxIS4gaJpZM4QV3d1&data=02%7C01%7C%7C9c3db8b8836b432a4df408d64f3916d4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636783503939047164&sdata=CY8hjHl%2FB%2BNjI7deZLEaev7QoM7Zhhi4kObGw%2BGd7JY%3D&reserved=0.

Was this page helpful?
0 / 5 - 0 ratings