google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

gwt-test-utils 0.28.2 doesnt support GwtEvent with UIBInder #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It works well with Dom Events, but not with Gwt custom events :

com.octo.gwt.test.exceptions.ReflectionException: Error during instanciation of 
'ma.awb.prototype.client.cheque.Compte'. Constructor threw exception
        at com.octo.gwt.test.utils.GwtReflectionUtils.instantiateClass(GwtReflectionUtils.java:332)
        at com.octo.gwt.test.internal.handlers.DefaultGwtCreateHandler.create(DefaultGwtCreateHandler.java:22)
        at com.octo.gwt.test.internal.patchers.GwtPatcher.create(GwtPatcher.java:23)
        at com.google.gwt.core.client.GWT.create(GWT.java)
        at com.octo.gwt.test.internal.uibinder.UiBinderTagBuilder.getInstance(UiBinderTagBuilder.java:173)
        at com.octo.gwt.test.internal.uibinder.UiBinderTagBuilder.createUiBinderTag(UiBinderTagBuilder.java:146)
        at com.octo.gwt.test.internal.uibinder.UiBinderTagBuilder.startTag(UiBinderTagBuilder.java:116)
        at com.octo.gwt.test.internal.uibinder.UiXmlContentHandler.startElement(UiXmlContentHandler.java:65)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at com.octo.gwt.test.internal.uibinder.GwtUiBinderParser.createUiComponent(GwtUiBinderParser.java:45)
        at com.octo.gwt.test.internal.uibinder.UiBinderInvocationHandler.createAndBindUi(UiBinderInvocationHandler.java:66)
        at com.octo.gwt.test.internal.uibinder.UiBinderInvocationHandler.invoke(UiBinderInvocationHandler.java:28)
        at ma.awb.prototype.client.cheque.$Proxy12.createAndBindUi(Unknown Source)
        at ma.awb.prototype.client.cheque.RetraitCheque.<init>(RetraitCheque.java:61)
        at ma.awb.prototype.test.cheque.RetraitChequeTest.testEffacer(RetraitChequeTest.java:27)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:600)
        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.runners.ParentRunner.run(ParentRunner.java:236)
        at com.octo.gwt.test.GwtRunnerBase.run(GwtRunnerBase.java:63)
        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)
Caused by: java.lang.ClassCastException: 
com.google.gwt.event.shared.GwtEvent$Type incompatible with 
com.google.gwt.event.dom.client.DomEvent$Type
        at com.octo.gwt.test.internal.uibinder.UiBinderInvocationHandler.getEventType(UiBinderInvocationHandler.java:119)
        at com.octo.gwt.test.internal.uibinder.UiBinderInvocationHandler.addDomHandlers(UiBinderInvocationHandler.java:44)
        at com.octo.gwt.test.internal.uibinder.UiBinderInvocationHandler.createAndBindUi(UiBinderInvocationHandler.java:68)
        at com.octo.gwt.test.internal.uibinder.UiBinderInvocationHandler.invoke(UiBinderInvocationHandler.java:28)
        at ma.awb.prototype.client.cheque.$Proxy16.createAndBindUi(Unknown Source)
        at ma.awb.prototype.client.cheque.Compte.<init>(Compte.java:51)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:44)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:516)
        at com.octo.gwt.test.utils.GwtReflectionUtils.instantiateClass(GwtReflectionUtils.java:311)
        ... 49 more 

Original issue reported on code.google.com by antoine....@gmail.com on 13 May 2011 at 3:27

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 13 May 2011 at 3:29

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 16 May 2011 at 8:13

GoogleCodeExporter commented 9 years ago
I wrote a patch for this in the lastest 0.28.3-SNAPSHOT, could you give it a 
try ?

Original comment by gael.laz...@gmail.com on 17 May 2011 at 12:14

GoogleCodeExporter commented 9 years ago
it's working on 0.28.3-SNAPSHOT
Thanks

Original comment by antoine....@gmail.com on 23 May 2011 at 4:31

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 23 May 2011 at 4:37

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 9 Jun 2011 at 3:32