google-code-export / gwt-test-utils

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

Probrem in UiBinder object populate #164

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create custom widget which extends Composite.  
2. Add @UiConstructor which has argument named 'size' (and no getter for size)
3. In test code,  instanciate a widget which contains the widget above.

What is the expected output? What do you see instead?

I got ReflectionException.

What version of the product are you using? On what operating system?

gwt-test-utils 0.41-SNAPSHOT , GWT 2.4.0 , OSX

Please provide any additional information below.

It looks the setSize() method defined in UIObject is called when it populates  
an object.

Stack trace:
com.googlecode.gwt.test.exceptions.ReflectionException: UiBinder error while 
setting properties for 'UiConstructorWidget'
at 
com.googlecode.gwt.test.uibinder.UiBinderBeanUtils.populateObject(UiBinderBeanUt
ils.java:72)
at com.googlecode.gwt.test.uibinder.UiObjectTag.startTag(UiObjectTag.java:292)
at 
com.googlecode.gwt.test.uibinder.UiTagBuilder.createUiTag(UiTagBuilder.java:153)
at com.googlecode.gwt.test.uibinder.UiTagBuilder.startTag(UiTagBuilder.java:123)
at 
com.googlecode.gwt.test.uibinder.UiXmlContentHandler.startElement(UiXmlContentHa
ndler.java:70)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(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.googlecode.gwt.test.uibinder.UiBinderParser.createUiComponent(UiBinderParser
.java:50)
at 
com.googlecode.gwt.test.uibinder.UiBinderInvocationHandler.createAndBindUi(UiBin
derInvocationHandler.java:83)
at 
com.googlecode.gwt.test.uibinder.UiBinderInvocationHandler.invoke(UiBinderInvoca
tionHandler.java:34)
at com.googlecode.gwt.test.uibinder.$Proxy60.createAndBindUi(Unknown Source)
at 
com.googlecode.gwt.test.uibinder.UiBinderWithUiConstructor.<init>(UiBinderWithUi
Constructor.java:21)
at 
com.googlecode.gwt.test.uibinder.UiBinderWithUiConstructorTest.instanciation(UiB
inderWithUiConstructorTest.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a: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:4
1)
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.ja
va:79)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71
)
at 
com.googlecode.gwt.test.internal.junit.GwtBlockJUnitParamsClassRunner.runChild(G
wtBlockJUnitParamsClassRunner.java:75)
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.junit.GwtBlockJUnit4ClassRunner.run(GwtBlockJUn
it4ClassRunner.java:27)
at 
com.googlecode.gwt.test.internal.junit.AbstractGwtRunner.run(AbstractGwtRunner.j
ava:47)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReferen
ce.java:50)
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.jav
a:197)
Caused by: java.lang.reflect.InvocationTargetException: Cannot set size
at 
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1025)
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
at 
com.googlecode.gwt.test.uibinder.UiBinderBeanUtils.populateObject(UiBinderBeanUt
ils.java:70)
... 49 more
Caused by: java.lang.NoSuchMethodException: Property 'size' has no setter method
at 
org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBe
an.java:1746)
at 
org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBe
an.java:1648)
at 
org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.jav
a:1677)
at 
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1022)
... 51 more

Original issue reported on code.google.com by tanaka.k...@gmail.com on 7 Sep 2012 at 1:03

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 7 Sep 2012 at 6:06

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 7 Sep 2012 at 6:07

GoogleCodeExporter commented 9 years ago
Fixed on the lastest 0.41-SNAPSHOT I've just deployed. Could you please update 
to give it a try and post some feedback here ? Thank you very much :-)

Original comment by gael.laz...@gmail.com on 7 Sep 2012 at 6:43

GoogleCodeExporter commented 9 years ago
I confirmed the problem was fixed with latest snapshot. 
Thank you for everything!

Original comment by tanaka.k...@gmail.com on 7 Sep 2012 at 2:50

GoogleCodeExporter commented 9 years ago
nice :)
thank you for your pull requests ;)

Original comment by gael.laz...@gmail.com on 7 Sep 2012 at 4:10