Friday, February 6, 2015

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

Seems like this error only occurs when I try to access a property of the deserialized bean. I changed my code to the following:

Console.debug("Response-- " + response.getText());



AutoBean<MyBean> ab = AutoBeanCodex.decode(factory, MyBean.class, response.getText());
Console.debug("Decode 1");


InitResult result = ab.as();
Console.debug("Decode 2: " + result.toString());


Console.debug("Result: " + result.getValue());




I now get the output:

Response-- {"value":"tesst"}
Decode 1
Decode 2: com.myModule.MyBeanAutoBean$2@1
com.google.gwt.core.client.JavaScriptException: (ReferenceError) : Ljava_util_List_2_classLit_0_g$ is not defined
Unknown.endVisitType_1_g$(MyModule-0.js@7:63876)
Unknown.traverse_1_g$(MyModule-0.js@18:61737)
Unknown.accept_5_g$(MyModule-0.js@8:61687)
Unknown.maybeCreateCoder_0_g$(MyModule-0.js@12:64201)
Unknown.visitValueProperty_3_g$(MyModule-0.js@8:64216)
Unknown.traverseProperties_0_g$(MyModule-0.js@20:4376)
Unknown.traverse_0_g$(MyModule-0.js@10:4303)
Unknown.accept_4_g$(MyModule-0.js@8:4168)
Unknown.doCoderFor_0_g$(MyModule-0.js@17:63727)
Unknown.getOrReify_0_g$(MyModule-0.js@16:4217)




Bean definition:

public interface MyBean extends Serializable
{
   
public String getValue();
   
public void setValue(String value);
}


public interface RequestBeanFactory extends AutoBeanFactory
{
   
public AutoBean<MyBean> myBean();
}



Any ideas?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment