Wednesday, December 18, 2024

Re: Getting 500 error from RPC call

You're triggering the LegacySerializationPolicy... we should make that clearer when it happens.

This occurs when your <hash>.gwt.rpc policy file wasn't present on the server (or wasnt at the expected path). Legacy serialization is much more strict in what it will accept.

Generated policy files ensure that the server and client agree on what can be serialized. This file is generated into the same directory as your .nocache.js file, and should be available on the server if running in production. If running with super dev mode and a separate server, you can direct the server to download the current policy file from SDM by specifying system property gwt.codeserver.port with the localhost port to the SDM server. Be sure to reload the server application or hot reload classes if they change, so that the server side classes match the client (and the client's policy file).

On Wednesday, December 18, 2024 at 3:48:49 PM UTC-6 ne...@propfinancing.com wrote:

I wrote a very simple class:

 

package com._3dmathpuzzles.slitherlink;

 

import java.io.Serializable;

 

public class TestPuzzle implements Serializable {

  private static final long serialVersionUID = 1L;

 

  /** Constructor */

  public TestPuzzle() {

    super();

  }

}

 

And updated my RPC call to use it and I still get this:

 

Exception while dispatching incoming RPC call

com.google.gwt.user.client.rpc.SerializationException:

Type 'com._3dmathpuzzles.slitherlink.TestPuzzle' was not assignable to

'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom field serializer.

For security purposes, this type will not be serialized.: instance =

com._3dmathpuzzles.slitherlink.TestPuzzle@40a58058

 

I am not sure what to do about this.  My class implements Serializable
and has a no-arg constructor.

 

Thank you,

 Neil

 

--

Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com

We offer 30 year loans on single family houses!

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/fcdfb609-0886-436b-9ef7-d6296c84587dn%40googlegroups.com.

No comments:

Post a Comment