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

mockit.internal.ClassFile$NotFoundException #71

Closed
evdzhan opened this issue Sep 23, 2014 · 8 comments
Closed

mockit.internal.ClassFile$NotFoundException #71

evdzhan opened this issue Sep 23, 2014 · 8 comments
Assignees
Labels
bug

Comments

@evdzhan
Copy link

@evdzhan evdzhan commented Sep 23, 2014

Hi there,

I am facing the following error when I try to mock an abstract class with JMockit 1.12. With JMockit 1.11 it works fine.

Enviroment :
OS Win7 64 bit
JDK 1.7.0_51 32 bit
JMockit 1.12

mockit.internal.ClassFile$NotFoundException: Unable to find class file for my.package.$Subclass_BaseWindow

The mockUp instantiation looks like :

new MockUp < BaseWindow > () {
// override stuff here
};

Here is the entire stack trace
mockit.internal.ClassFile$NotFoundException: Unable to find class file for my.package.$Subclass_BaseWindow
at mockit.internal.ClassFile.verifyClassFileFound(ClassFile.java:35)
at mockit.internal.ClassFile.readClassFromClasspath(ClassFile.java:101)
at mockit.internal.ClassFile.readFromFile(ClassFile.java:144)
at mockit.internal.ClassFile.createReaderFromLastRedefinitionIfAny(ClassFile.java:118)
at mockit.internal.mockups.MockClassSetup.createClassReaderForRealClass(MockClassSetup.java:135)
at mockit.internal.mockups.MockClassSetup.modifyRealClass(MockClassSetup.java:113)
at mockit.internal.mockups.MockClassSetup.redefineMethodsInClassHierarchy(MockClassSetup.java:90)
at mockit.internal.mockups.MockClassSetup.redefineMethods(MockClassSetup.java:78)
at mockit.MockUp.redefineMethods(MockUp.java:253)
at mockit.MockUp.redefineClassOrImplementInterface(MockUp.java:223)
at mockit.MockUp.(MockUp.java:134)

@rliesenfeld

This comment has been minimized.

Copy link
Member

@rliesenfeld rliesenfeld commented Sep 23, 2014

How would I reproduce that exception? Can you show an example test?

@evdzhan

This comment has been minimized.

Copy link
Author

@evdzhan evdzhan commented Sep 23, 2014

The thing is I cannot recreate the failure in a sample case. I was hoping on you giving me an advice on when one would get this problem so I can fix it. Do you think this could be JMockit bug or rather my own code issue ?

@rliesenfeld

This comment has been minimized.

Copy link
Member

@rliesenfeld rliesenfeld commented Sep 23, 2014

I don't know.

@charlouze

This comment has been minimized.

Copy link

@charlouze charlouze commented Oct 17, 2014

I found a way to reproduce this bug. Maybe I can send you a maven project that exposed this bug ?

@rliesenfeld

This comment has been minimized.

Copy link
Member

@rliesenfeld rliesenfeld commented Oct 17, 2014

Yes, paste the source files here if possible, or attach a zip file to a message in the JMockit Users group (https://groups.google.com/forum/#!forum/jmockit-users).

@charlouze

This comment has been minimized.

@rliesenfeld rliesenfeld self-assigned this Oct 17, 2014
@rliesenfeld

This comment has been minimized.

Copy link
Member

@rliesenfeld rliesenfeld commented Oct 17, 2014

Thanks, the sample test does reproduce the problem.

@rliesenfeld rliesenfeld reopened this Oct 17, 2014
@charlouze

This comment has been minimized.

Copy link

@charlouze charlouze commented Oct 17, 2014

Did you see the other bug that happens with 1.11 ?

@rliesenfeld rliesenfeld added bug and removed other labels Oct 24, 2014
@jmockit jmockit deleted a comment from yourganesan Jul 7, 2017
@jmockit jmockit deleted a comment from evdzhan Jul 7, 2017
@jmockit jmockit deleted a comment from samuelliang Jul 7, 2017
@jmockit jmockit deleted a comment from ignaciotcrespo Jul 7, 2017
@jmockit jmockit locked and limited conversation to collaborators Jul 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.