Re: ClassT is not serializable ?

2010-12-15 Thread yves
for your comments and advices. To solve my problem I'll do something like Didier said : I'll instantiate an object of type T (which is Serializable), instead of ClassT, and pass it to the server via the RPC. class MyTypeT extends MyGen  implements Serializable {     T anObject

Re: ClassT is not serializable ?

2010-12-14 Thread Paul Robinson
If you look at the Class.java that GWT uses to emulate the JVM's Class, you'll see that it does not implement Serializable. On 13/12/10 22:19, yves wrote: Hi, I have a class defined in a way similar to this: class MyTypeT extends MyGen extends Serializable { private ClassT aClass

Re: ClassT is not serializable ?

2010-12-14 Thread Didier Durand
look at the Class.java that GWT uses to emulate the JVM's Class, you'll see that it does not implement Serializable. On 13/12/10 22:19, yves wrote: Hi, I have a class defined in a way similar to this: class MyTypeT extends MyGen  extends Serializable {     private ClassT  aClass

Re: ClassT is not serializable ?

2010-12-14 Thread Paul Robinson
/12/10 22:19, yves wrote: Hi, I have a class defined in a way similar to this: class MyTypeT extends MyGenextends Serializable { private ClassTaClass; public MyType() {} public void setClass

Re: ClassT is not serializable ?

2010-12-14 Thread yves
similar to this: class MyTypeT extends MyGen    extends Serializable {      private ClassT    aClass;      public MyType() {}      public void setClass(ClassT    aClass) {         this.aClass = aClass;      } } where MyGen is also Serializable When I compile de project (I'am

Re: ClassT is not serializable ?

2010-12-14 Thread Paul Robinson
. Sorry. @Paul I didn't realized that Class is not GWT-serializable. Thanks for your remark. I lost pretty much time to find out why I get an exception during an RPC call It would have been nice if ClassT was serializable. I would have used it to select an appropriate handler at server-side. Anyway I

Re: ClassT is not serializable ?

2010-12-14 Thread Didier Durand
. It is just a typo in the example. Sorry. @Paul I didn't realized that Class is not GWT-serializable. Thanks for your remark. I lost pretty much time to find out why I get an exception during an RPC call It would have been nice if ClassT  was serializable. I would have used it to select

Re: ClassT is not serializable ?

2010-12-14 Thread ep
nice if ClassT was serializable. I would have used it to select an appropriate handler at server-side. Anyway I use instead the canonical class name to map the handler, but the code is little bit more uggly :-) I noticed also the a call to class.hashCode() does not give the same value

Re: ClassT is not serializable ?

2010-12-14 Thread yves
Hi all, thanks for your comments and advices. To solve my problem I'll do something like Didier said : I'll instantiate an object of type T (which is Serializable), instead of ClassT, and pass it to the server via the RPC. class MyTypeT extends MyGen implements Serializable { T anObject