no suggestions? mh then i should use classes instead of this interfaces..

Am Freitag, 9. März 2012 10:33:35 UTC+1 schrieb Viktor:
>
> Hi all, 
>
> for my application i need to parse custom objects with the simple-xml 
> framework from the server side. This works fine. But if a make a rpc 
> call from the client side to geht the Objects i get this Exception: 
>
>  [WARN] Exception while dispatching incoming RPC call 
> com.google.gwt.user.client.rpc.SerializationException: Type 'Media' 
> was not included in the set of types which can be serialized by this 
> SerializationPolicy or its Class object could not be loaded. For 
> security purposes, this type will not be serialized.: instance = 
> Media@12342d9 
>         at 
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:
>  
>
> 619) 
>         at 
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
>  
>
> 126) 
>         at 
> com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:
>  
>
> 44) 
>         at 
> com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize(ArrayList_CustomFieldSerializer.java:
>  
>
> 39) 
> .... 
>
> The Media Class look like this: 
>
> public class Media implements Serializable { 
>
>         /** 
>          * 
>          */ 
>         private static final long serialVersionUID = 
> -4959495795968436441L; 
>
>         public Media() { 
>         } 
>
>         @Attribute(required=false, name="condition") 
>         private String conditionText = null; 
>
>         @Attribute(required=false, name="conditiontype") 
>         private Executable.Type conditionType = null; 
>
>         @Attribute(required=true) 
>         private String src = null; 
>
>         @Attribute(required=true) 
>         private String type = null; 
>
>         @Attribute(required=false) 
>         private String name = null; 
>
>         @Element(required=false) 
>         private Condition condition = null; 
>
>         public String getSource() 
>         { 
>                 return src; 
>         } 
>
>         public void setSource(String source) 
>         { 
>                 this.src = source; 
>         } 
>
>         public String getType() 
>         { 
>                 return type; 
>         } 
>
>         public void setType(String type) 
>         { 
>                 this.type = type; 
>         } 
>
>         public void setConditionText(String conditionText) { 
>                 this.conditionText = conditionText; 
>         } 
>
>         public String getConditionText() { 
>                 return conditionText; 
>         } 
>
>         public void setConditionTypeText(Executable.Type conditionType) { 
>                 this.conditionType = conditionType; 
>         } 
>
>         public Executable.Type getConditionType() { 
>                 return conditionType; 
>         } 
>
>         public void setCondition(Condition condition) { 
>                 this.condition = condition; 
>         } 
>
>         public Condition getCondition() { 
>                 return condition; 
>         } 
>
>         public void setName(String name) { 
>                 this.name = name; 
>         } 
>
>         public String getName() { 
>                 return name; 
>         } 
>
>         @Commit 
>         public void createCondition() { 
>                 if (getConditionType()!=null && getConditionText()!=null) 
>                         
> setCondition(ConditionFactory.createCondition(getConditionType(), 
>
> getConditionText())); 
>         } 
>
> Executable and Condition are Interfaces.. i guess that is the problem, 
> because a interface couldn't implement Serializable. Is there a way to 
> put these interfaces trough rpc? or is there a workaround? 
>
> thanks and greetings 
> Viktor

-- 
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/-/tohBP_EfzyIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to