Open GoogleCodeExporter opened 9 years ago
There is something wrong with your "NoSuchMethodError" : DOM.getElementById()
is not patched by the DOMPatcher. Its implementation relies on
"Document.get().getElementById(id).cast();", patched in DocumentPatcher.
Could you please copy/paste the entire stacktrace ?
Original comment by gael.laz...@gmail.com
on 9 Jul 2012 at 1:08
BTW,
@PatchClass(target="com.googlecode.gwt.test.internal.patchers.dom.DOMPatcher")
is a very bad practice ;)
Original comment by gael.laz...@gmail.com
on 9 Jul 2012 at 1:10
Hello,
my complete stack trace (I skipped some lines related to my own class hierarchy)
java.lang.NoSuchMethodError:
com.google.gwt.user.client.DOM.getElementById(Ljava/lang/String;)Lcom/google/gwt
/user/client/Element;
at ...
com.googlecode.gwt.test.GwtTestWithMockito$FailureAnswer.answer(GwtTestWithMocki
to.java:46)
at org.mockito.internal.stubbing.StubbedInvocationMatcher.answer(StubbedInvocationMatcher.java:34)
at org.mockito.internal.MockHandler.handle(MockHandler.java:99)
at org.mockito.internal.InvocationNotifierHandler.handle(InvocationNotifierHandler.java:36)
at org.mockito.internal.creation.MethodInterceptorFilter.intercept(MethodInterceptorFilter.java:48)
at com.thales.primavera.extensions.pmdesk.gwt.common.server.PortalServiceAsync$$EnhancerByMockitoWithCGLIB$$fc2360c0.getSession(<generated>)
at com.thales.primavera.extensions.pmdesk.gwt.common.client.event.PMDeskUserConnectedEventHandler.onUserConnected(PMDeskUserConnectedEventHandler.java:76)
at com.thales.primavera.extensions.pmdesk.gwt.common.client.event.PMDeskUserConnectedEventHandlerTest.testOnUserConnectedFailure(PMDeskUserConnectedEventHandlerTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.InvokeMethod.evaluate(InvokeMethod.java:20)
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.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
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:236)
at com.googlecode.gwt.test.internal.runner.AbstractGwtRunner.run(AbstractGwtRunner.java:40)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
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)
Patching Document.class was my first attempt but I had the same error.
Regards
Original comment by david.le...@gmail.com
on 10 Jul 2012 at 10:12
I suspect some error with mockito and classloaders. Could you please update to
the lastest 0.40-SNAPSHOT, where I made some change on mock supports ?
Before upgrading, you should carefully read this :
http://code.google.com/p/gwt-test-utils/wiki/MigrationTo040
Original comment by gael.laz...@gmail.com
on 20 Jul 2012 at 5:35
Original issue reported on code.google.com by
david.le...@gmail.com
on 9 Jul 2012 at 11:26