Wednesday, December 18, 2024

Re: Class not included in the set of types for RPC

At a guess, the inner enum needs to be told it can be serialised.  Ie:

import com.google.gwt.user.client.rpc.IsSerializable;

enum STATUS implements IsSerializable { ... }

On Thursday, 19 December 2024 at 3:46:31 pm UTC+11 Neil Aggarwal wrote:
I am getting this error on the server:
Type 'com.propfinancing.puzzle.slitherlink.Line' 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 = Line 0

And looking in the .gwt.rpc file, it is not listed there.

Interestingly, I see this:
com.propfinancing.puzzle.slitherlink.Line$STATUS
which is an Enum in that class so the GWT compiler obviously processed the
class.

I did not get any warnings or error messages from the GWT compiler as to
why it
decided it did not like the class so now I have to guess what it did not
like.

Is there a way to improve the messaging to the user to help understand
what happened?

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/1b7ffc4f-beee-4594-9b8c-b327ee2148d7n%40googlegroups.com.

No comments:

Post a Comment