Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerMockito + Mockito 1.9.5 NoClassDefFound #418

Closed
johanhaleby opened this issue Jul 24, 2015 · 25 comments
Closed

PowerMockito + Mockito 1.9.5 NoClassDefFound #418

johanhaleby opened this issue Jul 24, 2015 · 25 comments

Comments

@johanhaleby
Copy link
Collaborator

From mellowaredev on July 20, 2012 19:53:25

It looks like Mockito 1.9.5 removed the MockitoInvocationHandler.java class PowerMockito was counting on.

java.lang.NoClassDefFoundError: org/mockito/internal/MockitoInvocationHandler
at org.powermock.api.mockito.PowerMockito.mock(PowerMockito.java:138)

Original issue: http://code.google.com/p/powermock/issues/detail?id=398

@johanhaleby
Copy link
Collaborator Author

From shripad....@gmail.com on July 30, 2012 19:00:02

Hi,
I'm also getting same issue.

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on August 04, 2012 10:54:36

I think Mockito has changed internally. PowerMock needs to catch up.

Status: Accepted
Labels: -Priority-Medium Priority-High

@johanhaleby
Copy link
Collaborator Author

From mellowaredev on August 04, 2012 11:54:20

Mockito definitely has changed and that class is no longer available.

@johanhaleby
Copy link
Collaborator Author

From pankajta...@gmail.com on August 29, 2012 06:03:20

+1 on this one.. any ETA on the fix?
I'd like to avoid a downgrade if possible.
Thanks!

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on August 29, 2012 06:10:40

Sorry there's no ETA unfortunately. I'm incredibly busy and these things are typically really hard to fix :/

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on August 29, 2012 06:12:10

Also I'd like to wait for the real 1.9.5 release since they may several additional changes internally which will mess up PowerMock again.

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on August 30, 2012 23:23:35

Status: Started

@johanhaleby
Copy link
Collaborator Author

From dmwallace.nz on August 31, 2012 12:45:24

Hi Johan,
Do you know what version number you'll use when this is done? 1.4.13 or 1.5.0? It's just that I'm writing some documentation for Mockito 1.9.5 at the moment, and I'd like to mention which version of PowerMock will be compatable with it.
Thanks.

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on August 31, 2012 13:47:02

Not quite sure but I guess 1.4.13.

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on August 31, 2012 13:49:43

I've made some good progress with this issue today btw. There are some a few spring integrations tests failing and I think it's because PowerMock's new MockMaker cannot be found in classpath for some reason. I hope to find some more time to investigate soon.

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on September 01, 2012 08:22:57

I've now implemented support for 1.9.5-rc1 in trunk. Please try it out by building from source and report an problems.

Status: Fixed

@johanhaleby
Copy link
Collaborator Author

From dmwallace.nz on September 01, 2012 11:28:28

That's fantastic news. Thank you Johan.

@johanhaleby
Copy link
Collaborator Author

From xudi...@gmail.com on September 12, 2012 07:45:59

Great news indeed. In the past few months I have come to depend on Mockito and PowerMock so heavily that it drives me crazy that Mockito 1.9.5 rc1 cannot support PowerMock anymore. Please keep the communication open between Mockito and PowerMock. Thanks a lot for the great work.

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on September 12, 2012 09:16:09

Could you try if it works for you? I'd like to release a new version but I really want to get someone to try it out so I feel more confident.

@johanhaleby
Copy link
Collaborator Author

From tom.fl...@gmail.com on October 09, 2012 10:35:28

Since no one else has commented I want to confirm that the changes in trunk work fine for me with the just released Mockito 1.9.5.

Hopefully a new version of PowerMock can be released soon.

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on October 09, 2012 23:05:49

That is good news! I'm waiting for a new version of Javassist that I think will be release any day now before I release PowerMock.

@johanhaleby
Copy link
Collaborator Author

From andrei.i...@gmail.com on November 14, 2012 04:00:11

javassist 3.17.0-GA showed up on the maven central repo :)

@johanhaleby
Copy link
Collaborator Author

From pawel.ur...@gmail.com on November 16, 2012 06:26:57

Hi! Where can I find patched version? JAR would be nice to have :)

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on November 16, 2012 16:09:24

There are some problems with the released version of Javassist that they will have to adress before a new version of PowerMock can be released.

@johanhaleby
Copy link
Collaborator Author

From pawel.ur...@gmail.com on November 16, 2012 16:12:29

Is it safe to use version from trunk for now? Static mocking seams to be working.

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on November 16, 2012 17:13:52

I believe it's safe yes. I plan to release it as is as soon as the next version of javassist is released (without any changes unless someone commits a patch for something).

@johanhaleby
Copy link
Collaborator Author

From tsuna...@gmail.com on November 18, 2012 17:27:25

What's the hold up with javassist 3.17.0-GA?

@johanhaleby
Copy link
Collaborator Author

From johan.ha...@gmail.com on November 18, 2012 23:09:21

See https://code.google.com/p/powermock/issues/detail?id=355

@johanhaleby
Copy link
Collaborator Author

From dana.ore...@workiva.com on November 21, 2012 07:55:41

javassist 3.17.0GA released a couple of days ago. It is in maven central now.

@johanhaleby
Copy link
Collaborator Author

From tsuna...@gmail.com on November 21, 2012 08:07:20

The problem is with 3.17.0-GA, so I guess we have to wait for either 3.17.1 or 3.18.0 to come out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant