As Arthur said, calling GWTMockUtilities.disarm() will prevent that error (that was in part 2 of my article :)
As for needing asm-attrs.jar, I guess try it - any NoClassDefFoundError that looks asm related then that will answer your question... Cheers, Chris. On Oct 25, 5:44 pm, Arthur Kalmenson <[email protected]> wrote: > It's possible to use EasyMock to mock out GWT widgets in a standard > JUnit or TestNG test, but you need to use GWTMockUtilities to disarm > GWT. > > -- > Arthur Kalmenson > > > > On Sun, Oct 25, 2009 at 12:58 AM, [email protected] <[email protected]> wrote: > > > I remember EasyMock didn't work for GWT, because it needed reflection, > > which wasn't available for client side programming. However, I'm doing > > MVP tests, so the code need not run in hosted mode, so EasyMode should > > run... right? However, I'm getting the following error -- can somebody > > point me in the right direction? > > > java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Enhancer at > > org.easymock.classextension.internal.MocksClassControl.createProxyFactory > > (MocksClassControl.java:78) > > at org.easymock.internal.MocksControl.createMock(MocksControl.java: > > 50) > > at org.easymock.classextension.EasyMock.createMock(EasyMock.java:46) > > at com.fkereki.mvptest.client.LoginPresenterTest.setUp > > (LoginPresenterTest.java:18) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke > > (NativeMethodAccessorImpl.java:57) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke > > (DelegatingMethodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:616) > > at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall > > (FrameworkMethod.java:44) > > at org.junit.internal.runners.model.ReflectiveCallable.run > > (ReflectiveCallable.java:15) > > at org.junit.runners.model.FrameworkMethod.invokeExplosively > > (FrameworkMethod.java:41) > > at org.junit.internal.runners.statements.RunBefores.evaluate > > (RunBefores.java:27) > > at org.junit.internal.runners.statements.RunAfters.evaluate > > (RunAfters.java:31) > > at org.junit.runners.BlockJUnit4ClassRunner.runChild > > (BlockJUnit4ClassRunner.java:73) > > at org.junit.runners.BlockJUnit4ClassRunner.runChild > > (BlockJUnit4ClassRunner.java:46) > > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) > > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) > > at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) > > at org.junit.internal.runners.statements.RunBefores.evaluate > > (RunBefores.java:28) > > at org.junit.internal.runners.statements.RunAfters.evaluate > > (RunAfters.java:31) > > at org.junit.runners.ParentRunner.run(ParentRunner.java:220) > > at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run > > (JUnit4TestReference.java:46) > > at org.eclipse.jdt.internal.junit.runner.TestExecution.run > > (TestExecution.java:38) > > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests > > (RemoteTestRunner.java:467) > > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests > > (RemoteTestRunner.java:683) > > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run > > (RemoteTestRunner.java:390) > > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main > > (RemoteTestRunner.java:197) > > Caused by: java.lang.ClassNotFoundException: > > net.sf.cglib.proxy.Enhancer > > at java.net.URLClassLoader$1.run(URLClassLoader.java:217) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java:205) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:323) > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:268) > > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336) > > ... 27 more --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
