Re: rpc serialization problem

2012-11-08 Thread Cleiton Cavassa

Cool! Benjamin hints worked for me.

Thanks!

Em terça-feira, 4 de agosto de 2009 23h52min57s UTC-3, mike escreveu:

 I have a simple one-to-many betwen two entities.  The parent entity 
 uses List to contain the child entities.  I am able to persist these 
 entities in the datastore without problems. 

 However, when reading a root entity at the server, I get: 

 rpc.SerializationException: Type 'org.datanucleus.sco.backed.List' was 
 not included in the set of types  which can be serialized... 

 The entities are successfully read from the datastore, but something 
 in Datanucleus doesn't build the List correctly. 

 Has anyone found a workaround for this serialization problem. 

 Thanks 

 GWT 1.7 GAE 1.2.2 


-- 
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/-/1CKD38ViDsoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: rpc serialization problem

2009-10-26 Thread Benjamin

I'm passed these problems now - a couple of things i learned when
creating object and storing in data nucleus for later retrieval over
an RPC call

- Most importantly, if you are returning a complex object (like one
with a list of another type of object) you need to return a copy, not
the object data nucleus returns - return persitenceManager.detachCopy
(object)  - the object returned by PM has all sorts of stuff in it
that can't be serialized, the detached copy does not.

Next, if your are creating an object with lists of other object that
are not necessarily parent/child relationships or anything you want to
persist, you need to decorate it with @NotPersistent because app
engine will mark things as persistent for you even if you don't want
it or mark it as persistent. See this note in the doc:

Tip: JDO specifies that fields of certain types are persistent by
default if neither the @Persistent nor @NotPersistent annotations are
specified, and fields of all other types are not persistent by
default. See the DataNucleus documentation for a complete description
of this behavior. Because not all of the App Engine datastore core
value types are persistent by default according to the JDO
specification, we recommend explicitly annotating fields as
@Persistent or @NotPersistent to make it clear.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: rpc serialization problem

2009-10-08 Thread Dominik Steiner

Hi,

I'm using JDO with App Engine and GWT and sending the domain objects
with the JDO tags via RPC is working fine, so not sure if the problem
is JPA?

HTH

Dominik

On Oct 7, 3:48 am, Lubomir lubomir.zrne...@gmail.com wrote:
 Hi, I was experimenting with it a bit as well and it seems to me that
 even the most simple Entity bean cannot be passed through RPC call. I
 had a simple class:

 @Entity
 public class Tournament implements Serializable {

         @Id
         @GeneratedValue(strategy = GenerationType.IDENTITY)
         private Long id;

         private int tournamentId;

         @Temporal(value = TemporalType.DATE)
         private Date date;
 ...
 and I wasnt able either to pass it from the server to the client or
 the other way. Once I removed all the JPA annotation (no other
 change!), everything went fine. So I think despite the fact that the
 class above is de facto compliant with GWT requirements for via-RPC-
 sendable classes (see the docs - serializable, fields serializable,
 etc.), it's the JPA annotations and its processing by DataNucleus that
 create the problem.
 That there's some kind of problem can also be seen in the tutorial for
 GWT and appengine: instead of much more natural approach (from certain
 point of view) of creating the Stock entity in client code and sending
 it through RPC, addStock is called only with String argument and Stock
 Entity is constructed on server. Same with getStock: stock list is
 fetched from datastore and then parsed and getStock() passes array of
 Strings back to client, although it would be nice and convenient to
 have Stock entity on client and populate the table by calling getters.
 The solution is to use either DTO pattern or a 3rd party library
 called Gilead (that does basically the same boring work of cloning
 entity, passing it to the client and when it comes back, merging it
 with the original)
 LZ

 On Oct 6, 11:06 pm, Sudeep S sudee...@gmail.com wrote:

   Hey Benjamin,

   Since u are using Generics ensure that all the classes Service, ServiceAync
  and ServiceImpl
   use the same signature i.e ListSubCatagory  .
     btw which version of gwt are u using.

   Also, you can the temp dir where u can find a rpc.log file with the list of
  all objects that are serialized.

  On Wed, Oct 7, 2009 at 2:20 AM, Benjamin bsaut...@gmail.com wrote:

   I'm struggeling with this now - did you guys solve it?  I have a
   simple client class that will be a parent in a simple parent-child
   relationship.  If i add an ArrayList property to the parent class (i
   don't even have to decorate it as persistant) i get

   EVERE: [1254861190636000] javax.servlet.ServletContext log: Exception
   while dispatching incoming RPC call
   com.google.gwt.user.client.rpc.SerializationException: Type
   'org.datanucleus.sco.backed.List' 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.

   i've tried java.util.list and java.util.arraylist with same result -
   defiitly not a 'org.datanucleus.sco.backed.List'

   what's odd is that the RPC call runs in a way and the object is
   persisted but without the list field.

   Anyway - this seems like something that can't be passed in an RPC call
   but i don't see why

   @PersistenceCapable(identityType = IdentityType.APPLICATION)
   public class Catagory extends BaseTreeModel implements Serializable {

   public  Catagory() {}

          private static final long serialVersionUID = 1L;
         �...@primarykey
     �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
     �...@extension(vendorName=datanucleus, key=gae.encoded-pk,
   value=true)
          private String key;

           @Persistent(mappedBy = catagory)
     private  ListSubCatagory subcatagories;

   }

   On Sep 22, 5:43 am, Angel gonzalezm.an...@gmail.com wrote:
i have the same problem

On 5 ago, 04:52, mike m...@introspect.com wrote:

 I have a simple one-to-many betwen two entities.  The parent entity
 uses List to contain the child entities.  I am able to persist these
 entities in the datastore without problems.

 However, when reading a root entity at the server, I get:

 rpc.SerializationException: Type 'org.datanucleus.sco.backed.List' was
 not included in the set of types  which can be serialized...

 The entities are successfully read from the datastore, but something
 in Datanucleus doesn't build the List correctly.

 Has anyone found a workaround for this serialization problem.

 Thanks

 GWT 1.7 GAE 1.2.2- Hide quoted text -

- Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 

Re: rpc serialization problem

2009-10-08 Thread brancoch

The problem comes from instrumentation done by the ORM. Most of the
ORM substitute the implementation of the List, Map or Set with their
own implementation since they need to track invocation of method of
the collection. I know that the latest GWT 2.0 code base is putting
code in the RPC framework to support JDO so this is probably why it is
working.
Note that relationship to the one side (for example a Customer entity)
in JPA will likely be instrumented as well.

In my project where we are using Hibernate, I have minimally enhanced
the RPC framework (ServerSerializationStreamWriter.java,
SerializabilityUtil.java) to workaround this issue.

I know other framework are trying to solve this problem but I find my
approach more efficient in term of performance even if it is less
flexible (need to be adapted for other ORM).

I suspect that it should be easy to adapt my approach for DataNucleus.

Let me know if you would like to see the coce?

On Oct 8, 7:49 pm, Dominik Steiner dominik.j.stei...@googlemail.com
wrote:
 Hi,

 I'm using JDO with App Engine and GWT and sending the domain objects
 with the JDO tags via RPC is working fine, so not sure if the problem
 is JPA?

 HTH

 Dominik

 On Oct 7, 3:48 am, Lubomir lubomir.zrne...@gmail.com wrote:



  Hi, I was experimenting with it a bit as well and it seems to me that
  even the most simple Entity bean cannot be passed through RPC call. I
  had a simple class:

  @Entity
  public class Tournament implements Serializable {

          @Id
          @GeneratedValue(strategy = GenerationType.IDENTITY)
          private Long id;

          private int tournamentId;

          @Temporal(value = TemporalType.DATE)
          private Date date;
  ...
  and I wasnt able either to pass it from the server to the client or
  the other way. Once I removed all the JPA annotation (no other
  change!), everything went fine. So I think despite the fact that the
  class above is de facto compliant with GWT requirements for via-RPC-
  sendable classes (see the docs - serializable, fields serializable,
  etc.), it's the JPA annotations and its processing by DataNucleus that
  create the problem.
  That there's some kind of problem can also be seen in the tutorial for
  GWT and appengine: instead of much more natural approach (from certain
  point of view) of creating the Stock entity in client code and sending
  it through RPC, addStock is called only with String argument and Stock
  Entity is constructed on server. Same with getStock: stock list is
  fetched from datastore and then parsed and getStock() passes array of
  Strings back to client, although it would be nice and convenient to
  have Stock entity on client and populate the table by calling getters.
  The solution is to use either DTO pattern or a 3rd party library
  called Gilead (that does basically the same boring work of cloning
  entity, passing it to the client and when it comes back, merging it
  with the original)
  LZ

  On Oct 6, 11:06 pm, Sudeep S sudee...@gmail.com wrote:

    Hey Benjamin,

    Since u are using Generics ensure that all the classes Service, 
   ServiceAync
   and ServiceImpl
    use the same signature i.e ListSubCatagory  .
      btw which version of gwt are u using.

    Also, you can the temp dir where u can find a rpc.log file with the list 
   of
   all objects that are serialized.

   On Wed, Oct 7, 2009 at 2:20 AM, Benjamin bsaut...@gmail.com wrote:

I'm struggeling with this now - did you guys solve it?  I have a
simple client class that will be a parent in a simple parent-child
relationship.  If i add an ArrayList property to the parent class (i
don't even have to decorate it as persistant) i get

EVERE: [1254861190636000] javax.servlet.ServletContext log: Exception
while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type
'org.datanucleus.sco.backed.List' 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.

i've tried java.util.list and java.util.arraylist with same result -
defiitly not a 'org.datanucleus.sco.backed.List'

what's odd is that the RPC call runs in a way and the object is
persisted but without the list field.

Anyway - this seems like something that can't be passed in an RPC call
but i don't see why

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Catagory extends BaseTreeModel implements Serializable {

public  Catagory() {}

       private static final long serialVersionUID = 1L;
      �...@primarykey
  �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  �...@extension(vendorName=datanucleus, key=gae.encoded-pk,
value=true)
       private String key;

        @Persistent(mappedBy = catagory)
  private  ListSubCatagory subcatagories;

}

On 

Re: rpc serialization problem

2009-10-07 Thread Lubomir

Hi, I was experimenting with it a bit as well and it seems to me that
even the most simple Entity bean cannot be passed through RPC call. I
had a simple class:

@Entity
public class Tournament implements Serializable {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private int tournamentId;

@Temporal(value = TemporalType.DATE)
private Date date;
...
and I wasnt able either to pass it from the server to the client or
the other way. Once I removed all the JPA annotation (no other
change!), everything went fine. So I think despite the fact that the
class above is de facto compliant with GWT requirements for via-RPC-
sendable classes (see the docs - serializable, fields serializable,
etc.), it's the JPA annotations and its processing by DataNucleus that
create the problem.
That there's some kind of problem can also be seen in the tutorial for
GWT and appengine: instead of much more natural approach (from certain
point of view) of creating the Stock entity in client code and sending
it through RPC, addStock is called only with String argument and Stock
Entity is constructed on server. Same with getStock: stock list is
fetched from datastore and then parsed and getStock() passes array of
Strings back to client, although it would be nice and convenient to
have Stock entity on client and populate the table by calling getters.
The solution is to use either DTO pattern or a 3rd party library
called Gilead (that does basically the same boring work of cloning
entity, passing it to the client and when it comes back, merging it
with the original)
LZ


On Oct 6, 11:06 pm, Sudeep S sudee...@gmail.com wrote:
  Hey Benjamin,

  Since u are using Generics ensure that all the classes Service, ServiceAync
 and ServiceImpl
  use the same signature i.e ListSubCatagory  .
    btw which version of gwt are u using.

  Also, you can the temp dir where u can find a rpc.log file with the list of
 all objects that are serialized.



 On Wed, Oct 7, 2009 at 2:20 AM, Benjamin bsaut...@gmail.com wrote:

  I'm struggeling with this now - did you guys solve it?  I have a
  simple client class that will be a parent in a simple parent-child
  relationship.  If i add an ArrayList property to the parent class (i
  don't even have to decorate it as persistant) i get

  EVERE: [1254861190636000] javax.servlet.ServletContext log: Exception
  while dispatching incoming RPC call
  com.google.gwt.user.client.rpc.SerializationException: Type
  'org.datanucleus.sco.backed.List' 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.

  i've tried java.util.list and java.util.arraylist with same result -
  defiitly not a 'org.datanucleus.sco.backed.List'

  what's odd is that the RPC call runs in a way and the object is
  persisted but without the list field.

  Anyway - this seems like something that can't be passed in an RPC call
  but i don't see why

  @PersistenceCapable(identityType = IdentityType.APPLICATION)
  public class Catagory extends BaseTreeModel implements Serializable {

  public  Catagory() {}

         private static final long serialVersionUID = 1L;
        �...@primarykey
    �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    �...@extension(vendorName=datanucleus, key=gae.encoded-pk,
  value=true)
         private String key;

          @Persistent(mappedBy = catagory)
    private  ListSubCatagory subcatagories;

  }

  On Sep 22, 5:43 am, Angel gonzalezm.an...@gmail.com wrote:
   i have the same problem

   On 5 ago, 04:52, mike m...@introspect.com wrote:

I have a simple one-to-many betwen two entities.  The parent entity
uses List to contain the child entities.  I am able to persist these
entities in the datastore without problems.

However, when reading a root entity at the server, I get:

rpc.SerializationException: Type 'org.datanucleus.sco.backed.List' was
not included in the set of types  which can be serialized...

The entities are successfully read from the datastore, but something
in Datanucleus doesn't build the List correctly.

Has anyone found a workaround for this serialization problem.

Thanks

GWT 1.7 GAE 1.2.2- Hide quoted text -

   - Show quoted text -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: rpc serialization problem

2009-10-06 Thread Benjamin

I'm struggeling with this now - did you guys solve it?  I have a
simple client class that will be a parent in a simple parent-child
relationship.  If i add an ArrayList property to the parent class (i
don't even have to decorate it as persistant) i get

EVERE: [1254861190636000] javax.servlet.ServletContext log: Exception
while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type
'org.datanucleus.sco.backed.List' 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.

i've tried java.util.list and java.util.arraylist with same result -
defiitly not a 'org.datanucleus.sco.backed.List'

what's odd is that the RPC call runs in a way and the object is
persisted but without the list field.

Anyway - this seems like something that can't be passed in an RPC call
but i don't see why

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Catagory extends BaseTreeModel implements Serializable {

public  Catagory() {}

private static final long serialVersionUID = 1L;
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName=datanucleus, key=gae.encoded-pk,
value=true)
private String key;

 @Persistent(mappedBy = catagory)
   private  ListSubCatagory subcatagories;


}



On Sep 22, 5:43 am, Angel gonzalezm.an...@gmail.com wrote:
 i have the same problem

 On 5 ago, 04:52, mike m...@introspect.com wrote:



  I have a simple one-to-many betwen two entities.  The parent entity
  uses List to contain the child entities.  I am able to persist these
  entities in the datastore without problems.

  However, when reading a root entity at the server, I get:

  rpc.SerializationException: Type 'org.datanucleus.sco.backed.List' was
  not included in the set of types  which can be serialized...

  The entities are successfully read from the datastore, but something
  in Datanucleus doesn't build the List correctly.

  Has anyone found a workaround for this serialization problem.

  Thanks

  GWT 1.7 GAE 1.2.2- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: rpc serialization problem

2009-10-06 Thread Sudeep S
 Hey Benjamin,

 Since u are using Generics ensure that all the classes Service, ServiceAync
and ServiceImpl
 use the same signature i.e ListSubCatagory  .
   btw which version of gwt are u using.

 Also, you can the temp dir where u can find a rpc.log file with the list of
all objects that are serialized.



On Wed, Oct 7, 2009 at 2:20 AM, Benjamin bsaut...@gmail.com wrote:


 I'm struggeling with this now - did you guys solve it?  I have a
 simple client class that will be a parent in a simple parent-child
 relationship.  If i add an ArrayList property to the parent class (i
 don't even have to decorate it as persistant) i get

 EVERE: [1254861190636000] javax.servlet.ServletContext log: Exception
 while dispatching incoming RPC call
 com.google.gwt.user.client.rpc.SerializationException: Type
 'org.datanucleus.sco.backed.List' 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.

 i've tried java.util.list and java.util.arraylist with same result -
 defiitly not a 'org.datanucleus.sco.backed.List'

 what's odd is that the RPC call runs in a way and the object is
 persisted but without the list field.

 Anyway - this seems like something that can't be passed in an RPC call
 but i don't see why

 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class Catagory extends BaseTreeModel implements Serializable {

 public  Catagory() {}

private static final long serialVersionUID = 1L;
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName=datanucleus, key=gae.encoded-pk,
 value=true)
private String key;

 @Persistent(mappedBy = catagory)
   private  ListSubCatagory subcatagories;


 }



 On Sep 22, 5:43 am, Angel gonzalezm.an...@gmail.com wrote:
  i have the same problem
 
  On 5 ago, 04:52, mike m...@introspect.com wrote:
 
 
 
   I have a simple one-to-many betwen two entities.  The parent entity
   uses List to contain the child entities.  I am able to persist these
   entities in the datastore without problems.
 
   However, when reading a root entity at the server, I get:
 
   rpc.SerializationException: Type 'org.datanucleus.sco.backed.List' was
   not included in the set of types  which can be serialized...
 
   The entities are successfully read from the datastore, but something
   in Datanucleus doesn't build the List correctly.
 
   Has anyone found a workaround for this serialization problem.
 
   Thanks
 
   GWT 1.7 GAE 1.2.2- Hide quoted text -
 
  - Show quoted text -
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: rpc serialization problem

2009-09-22 Thread Angel

i have the same problem

On 5 ago, 04:52, mike m...@introspect.com wrote:
 I have a simple one-to-many betwen two entities.  The parent entity
 uses List to contain the child entities.  I am able to persist these
 entities in the datastore without problems.

 However, when reading a root entity at the server, I get:

 rpc.SerializationException: Type 'org.datanucleus.sco.backed.List' was
 not included in the set of types  which can be serialized...

 The entities are successfully read from the datastore, but something
 in Datanucleus doesn't build the List correctly.

 Has anyone found a workaround for this serialization problem.

 Thanks

 GWT 1.7 GAE 1.2.2
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: rpc serialization problem

2009-09-03 Thread Chris Lowe

Are the List fields on your objects specified in terms of interfaces?
GWT RPC needs to know as much about your objects at compile time,
could you try using a concrete class instead - preferably ArrayList?

It sounds like you're trying to serialize ORM objects directly, is
that right?  I don't know much about Data Nucleus and whether or not
it dynamically enhances entity objects under its control with proxies
etc.  My experience is with Hibernate which usually does add something
to a class, so serializing entities directly is strongly discouraged -
either the entity objects have to be filtered of the Hibernate
extras, or values copied into DTOs.

On Sep 2, 10:35 am, jvoro...@googlemail.com
jvoro...@googlemail.com wrote:
 Hallo,
 i have the same problem.
 List (GWT) can not be used in DataNuceleus.

 Can every one help pleas!
 THX

 On 5 Aug., 04:52, mike m...@introspect.com wrote:



  I have a simple one-to-many betwen two entities.  The parent entity
  uses List to contain the child entities.  I am able to persist these
  entities in the datastore without problems.

  However, when reading a root entity at the server, I get:

  rpc.SerializationException: Type 'org.datanucleus.sco.backed.List' was
  not included in the set of types  which can be serialized...

  The entities are successfully read from the datastore, but something
  in Datanucleus doesn't build the List correctly.

  Has anyone found a workaround for this serialization problem.

  Thanks

  GWT 1.7 GAE 1.2.2
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: rpc serialization problem

2009-09-02 Thread jvoro...@googlemail.com

Hallo,
i have the same problem.
List (GWT) can not be used in DataNuceleus.

Can every one help pleas!
THX

On 5 Aug., 04:52, mike m...@introspect.com wrote:
 I have a simple one-to-many betwen two entities.  The parent entity
 uses List to contain the child entities.  I am able to persist these
 entities in the datastore without problems.

 However, when reading a root entity at the server, I get:

 rpc.SerializationException: Type 'org.datanucleus.sco.backed.List' was
 not included in the set of types  which can be serialized...

 The entities are successfully read from the datastore, but something
 in Datanucleus doesn't build the List correctly.

 Has anyone found a workaround for this serialization problem.

 Thanks

 GWT 1.7 GAE 1.2.2

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: RPC/Serialization problem with StockWatcher tutorial

2009-06-03 Thread Isaac Truett

Your StockPrice doesn't have a no-arg constructor.


On Wed, Jun 3, 2009 at 1:27 PM, james.o...@gmail.com
james.o...@gmail.com wrote:

 I'm going through the StockWatcher tutorial and I get to the RPC part
 (http://code.google.com/webtoolkit/tutorials/1.6/RPC.html).

 At the first test point I get this error message as expected ...

  [ERROR] Type 'com.google.gwt.sample.stockwatcher.client.StockPrice'
 was not serializable
  and has no concrete serializable subtypes

 However, after putting in the code to fix it ... I still get the
 same error.  What am I missing?

 Here is my StockPrice class ...

 package com.google.gwt.sample.stockwatcher.client;

 import java.io.Serializable;

 public class StockPrice implements Serializable {
        private String symbol;
        private double price;
        private double change;

        public StockPrice(String symbol, double price, double change) {
                this.symbol = symbol;
                this.price = price;
                this.change = change;
        }

        public String getSymbol() { return this.symbol; }
        public double getPrice() { return this.price; }
        public double getChange() { return this.change; }

        public double getChangePercent() {
                return 100.0 * this.change / this.price;
        }

        public void setSymbol(String symbol) { this.symbol = symbol; }
        public void setPrice(double price) { this.price = price; }
        public void setChange(double change) { this.change = change; }
 }

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: RPC/Serialization problem with StockWatcher tutorial

2009-06-03 Thread James Orr
Thanks!  I guess I missed that line earlier in the tutorial.

On Wed, Jun 3, 2009 at 2:08 PM, Isaac Truett itru...@gmail.com wrote:


 Your StockPrice doesn't have a no-arg constructor.


 On Wed, Jun 3, 2009 at 1:27 PM, james.o...@gmail.com
 james.o...@gmail.com wrote:
 
  I'm going through the StockWatcher tutorial and I get to the RPC part
  (http://code.google.com/webtoolkit/tutorials/1.6/RPC.html).
 
  At the first test point I get this error message as expected ...
 
   [ERROR] Type 'com.google.gwt.sample.stockwatcher.client.StockPrice'
  was not serializable
   and has no concrete serializable subtypes
 
  However, after putting in the code to fix it ... I still get the
  same error.  What am I missing?
 
  Here is my StockPrice class ...
 
  package com.google.gwt.sample.stockwatcher.client;
 
  import java.io.Serializable;
 
  public class StockPrice implements Serializable {
 private String symbol;
 private double price;
 private double change;
 
 public StockPrice(String symbol, double price, double change) {
 this.symbol = symbol;
 this.price = price;
 this.change = change;
 }
 
 public String getSymbol() { return this.symbol; }
 public double getPrice() { return this.price; }
 public double getChange() { return this.change; }
 
 public double getChangePercent() {
 return 100.0 * this.change / this.price;
 }
 
 public void setSymbol(String symbol) { this.symbol = symbol; }
 public void setPrice(double price) { this.price = price; }
 public void setChange(double change) { this.change = change; }
  }
 
  
 

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---