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

Mockito 1.10.16 - NoClassDefFoundError: org/mockito/internal/creation/jmock/ClassImposterizer #13

Open
eyforia opened this issue Dec 18, 2014 · 5 comments

Comments

@eyforia
Copy link

eyforia commented Dec 18, 2014

Getting NoClassDefFound running mockito groovy tests:

java.lang.NoClassDefFoundError: org/mockito/internal/creation/jmock/ClassImposterizer
at com.cyrusinnovation.mockitogroovysupport.GroovyCglibMockMaker.createMock(GroovyCglibMockMaker.java:20)
at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:33)
at org.mockito.internal.MockitoCore.mock(MockitoCore.java:59)
at org.mockito.Mockito.mock(Mockito.java:1285)
at org.mockito.Mockito.mock(Mockito.java:1163)

@budjb
Copy link

budjb commented Feb 3, 2015

I'm facing this too. Using Mockito 1.10.19.

atreides322 added a commit to atreides322/mockito-groovy-support that referenced this issue Mar 29, 2015
This is an inelegant solution, but as of 1.10.9, classes that this
depended on became package protected. The simplest fix is to move the
child classes to the same package.

This addresses issue cyrusinnovation#13
@Petikoch
Copy link

Same problem here... using Mockito 1.10.19.

Up to Mockito version 1.10.8 mockito-groovy-support 1.3 works fine...

@eyforia
Copy link
Author

eyforia commented Mar 31, 2015

Solved by switching to Spock Mocks :-)

@atreides322
Copy link

The problem is that as of 1.10.9, there was a fair amount of work within Mockito to abstract the internal dependencies on cglib. This involved moving several classes to a different package and making them package protected in scope.

@xiexiaoyan119
Copy link

Using mockito-core-2.1.0-RC.1.jar at Android Studio, also appear this issue

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

No branches or pull requests

5 participants