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

EasierMock doesn't seem to work well with EasyMock 3.4 #1

Closed
fsparv opened this issue Mar 30, 2016 · 2 comments
Closed

EasierMock doesn't seem to work well with EasyMock 3.4 #1

fsparv opened this issue Mar 30, 2016 · 2 comments
Assignees
Milestone

Comments

@fsparv
Copy link
Owner

fsparv commented Mar 30, 2016

A gradle config like this:

  testCompile 'org.easymock:easymock:3.4'
  testCompile 'com.needhamsoftware:easier-mock:1.0'

Leads to every test erroring out like this:

org.jesterj.ingest.logging.CassandraConfigTest > testSeveralShouldBelast FAILED
    java.lang.NoClassDefFoundError at CassandraConfigTest.java:58
        Caused by: java.lang.ClassNotFoundException at CassandraConfigTest.java:58

This becomes important because of easymock/easymock#151

@nsoft
Copy link
Contributor

nsoft commented Sep 24, 2016

more info from intellij debugging:

java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Callback

    at org.jesterj.ingest.config.AnnotationUtilTest.<init>(AnnotationUtilTest.java:43)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:195)
    at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:244)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:241)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
Caused by: java.lang.ClassNotFoundException: net.sf.cglib.proxy.Callback
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 22 more

@nsoft
Copy link
Contributor

nsoft commented Sep 24, 2016

Ah root of the problem is that they removed cglib entirely, which means a lot code in EasierMocks.java needs to change. Such is the risk I took fiddling with their internals... sigh

@fsparv fsparv closed this as completed in 3761bc4 Sep 24, 2016
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

2 participants