In our application and in my test the issue occurs because we have an object that can have a reference to another object of the same class. Here is a link to the test http://pastebin.com/NG1Xzw6h . All of the tests pass except for "testGetAllProxySerializeDeserializeWithParentProxyObjectsSet".
The workaround would be to serialize each object with one payload but that creates a bigger overall payload since there can be a lot of duplication.
Is this really a bug? Before I filed a bug I wanted to post the question here.
Here is a stack trace of the exception:
java.lang.IllegalStateException: The AutoBean has been frozen
at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.checkFrozen(AbstractAutoBean.java:195)
at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.checkFrozen(ProxyAutoBean.java:196)
at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.setProperty(AbstractAutoBean.java:270)
at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.setProperty(ProxyAutoBean.java:253)
at com.google.web.bindery.autobean.vm.impl.BeanPropertyContext.set(BeanPropertyContext.java:44)
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$3.visitValueProperty(AbstractRequestContext.java:910)
at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.traverseProperties(ProxyAutoBean.java:289)
at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.traverse(AbstractAutoBean.java:166)
at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.accept(AbstractAutoBean.java:101)
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.processReturnOperation(AbstractRequestContext.java:879)
at com.google.web.bindery.requestfactory.shared.impl.ProxySerializerImpl.getProxyForReturnPayloadGraph(ProxySerializerImpl.java:167)
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.getBeanForPayload(AbstractRequestContext.java:588)
at com.google.web.bindery.requestfactory.shared.impl.EntityCodex.decode(EntityCodex.java:101)
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$3.visitReferenceProperty(AbstractRequestContext.java:889)
at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.traverseProperties(ProxyAutoBean.java:324)
at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.traverse(AbstractAutoBean.java:166)
at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.accept(AbstractAutoBean.java:101)
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.processReturnOperation(AbstractRequestContext.java:879)
at com.google.web.bindery.requestfactory.shared.impl.ProxySerializerImpl.getProxyForReturnPayloadGraph(ProxySerializerImpl.java:167)
at com.google.web.bindery.requestfactory.shared.impl.ProxySerializerImpl.doDeserialize(ProxySerializerImpl.java:184)
at com.google.web.bindery.requestfactory.shared.impl.ProxySerializerImpl.deserialize(ProxySerializerImpl.java:80)
at com.rodm.gwt.requestfactory.ProxySerializerBugTest.doProxySerializerTest(ProxySerializerBugTest.java:285)
at com.rodm.gwt.requestfactory.ProxySerializerBugTest.testGetAllProxySerializeDeserializeWithParentProxyObjectsSet(ProxySerializerBugTest.java:259)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.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.java:197)
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/_4mdhDfJ9B0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment