> Enumeration constants are serialized as a name only; none of the field values are serialized.
What are the consequences of not having the values?
Reading on the Internet, it means I can’t use valueOf() and ordinal().
But, does it work normally otherwise?
Can I assign a constant value to a field, read that value, and compare the value to one of the
constants?
> Can you confirm that the policy file does include Line
It does not have Line in it:
@FinalFields, true
com._3dmathpuzzles.play.client.GetPuzzleService, false, false, false, false, _, 4203465842
com._3dmathpuzzles.slitherlink.RectangularWithDiagonalsPuzzle, true, true, false, false, com._3dmathpuzzles.slitherlink.RectangularWithDiagonalsPuzzle/2547295082, 2547295082
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533
com.google.gwt.user.client.rpc.RpcTokenException, true, true, false, false, com.google.gwt.user.client.rpc.RpcTokenException/2345075298, 2345075298
com.google.gwt.user.client.rpc.XsrfToken, false, false, true, true, com.google.gwt.user.client.rpc.XsrfToken/4254043109, 4254043109
com.propfinancing.puzzle.Puzzle, true, false, false, false, com.propfinancing.puzzle.Puzzle/1723715424, 1723715424
com.propfinancing.puzzle.slitherlink.Box, true, true, false, false, com.propfinancing.puzzle.slitherlink.Box/1302152982, 1302152982
com.propfinancing.puzzle.slitherlink.Box$STATE, true, true, false, false, com.propfinancing.puzzle.slitherlink.Box$STATE/1639054469, 1639054469
com.propfinancing.puzzle.slitherlink.BoxWithDiagonals, true, true, false, false, com.propfinancing.puzzle.slitherlink.BoxWithDiagonals/2774485663, 2774485663
com.propfinancing.puzzle.slitherlink.Component, true, false, false, false, com.propfinancing.puzzle.slitherlink.Component/4011233562, 4011233562
com.propfinancing.puzzle.slitherlink.Line$STATUS, true, true, false, false, com.propfinancing.puzzle.slitherlink.Line$STATUS/1640439993, 1640439993
com.propfinancing.puzzle.slitherlink.NumberedBox, true, true, false, false, com.propfinancing.puzzle.slitherlink.NumberedBox/1782628205, 1782628205
com.propfinancing.puzzle.slitherlink.Puzzle, true, false, false, false, com.propfinancing.puzzle.slitherlink.Puzzle/2584703185, 2584703185
com.propfinancing.puzzle.slitherlink.RectangularPuzzle, true, false, false, false, com.propfinancing.puzzle.slitherlink.RectangularPuzzle/3177548746, 3177548746
com.propfinancing.puzzle.slitherlink.RectangularWithDiagonalsPuzzle, true, false, false, false, com.propfinancing.puzzle.slitherlink.RectangularWithDiagonalsPuzzle/3793384887, 3793384887
java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873
java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647
java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611
java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131
java.util.ArrayList, true, true, false, false, java.util.ArrayList/4159755760, 4159755760
java.util.HashMap, true, true, false, false, java.util.HashMap/1797211028, 1797211028
java.util.LinkedHashMap, true, true, false, false, java.util.LinkedHashMap/3008245022, 3008245022
> the GWT-RPC generator (run when the compiler is invoked) might not have seen a clear path to how this type could be used
Unfortunately, it is silent about the reason.
I am hoping we can improve it help the developer instead of leaving me to make guesses.
> Enumeration constants are serialized as a name only; none of the field values are serialized.
What are the consequences of not having the values?
> Can you confirm that the policy file does include Line
It does not have Line in it:
> Improving the explanation of why Line isn't present would require exhaustively listing all the possible
> fields/etc that where is _isn't_ valid to assign a Line instance
An exhaustive irrelevant list might be worse.
I was thinking it might be something within the class which the compiler did not like.
> If you can point out in code how you expect to be able to send the Line type (which field in which other
> type that _is_ present in that list) it would be easier to offer an explanation.
com.propfinancing.puzzle.slitherlink.Box is in the list.
It has this field:
private ArrayList<Line> lines;
> The consequence is that your enums should never ever have changing data stored
Got it. I never modify the enum via code. That would be a bit strange.
> Maybe Line isn't the only class that is missing in the policy file?
Yes, there are others which are missing.
> As a workaround you can always add dummy methods to your GWT-RPC service, e.g.
> Line getDummyLine(), to make a class visible to GWT
I added this method to com.propfinancing.puzzle.slitherlink.Box:
public Line gwtGetLine() {
return new Line();
}
And the generated .gwt.rpc has Box, but still does not have Line:
@FinalFields, true
com._3dmathpuzzles.play.client.GetPuzzleService, false, false, false, false, _, 4203465842
com._3dmathpuzzles.slitherlink.RectangularWithDiagonalsPuzzle, true, true, false, false, com._3dmathpuzzles.slitherlink.RectangularWithDiagonalsPuzzle/2547295082, 2547295082
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533
com.google.gwt.user.client.rpc.RpcTokenException, true, true, false, false, com.google.gwt.user.client.rpc.RpcTokenException/2345075298, 2345075298
com.google.gwt.user.client.rpc.XsrfToken, false, false, true, true, com.google.gwt.user.client.rpc.XsrfToken/4254043109, 4254043109
com.propfinancing.puzzle.Puzzle, true, false, false, false, com.propfinancing.puzzle.Puzzle/1723715424, 1723715424
com.propfinancing.puzzle.slitherlink.Box, true, true, false, false, com.propfinancing.puzzle.slitherlink.Box/1302152982, 1302152982
com.propfinancing.puzzle.slitherlink.Box$STATE, true, true, false, false, com.propfinancing.puzzle.slitherlink.Box$STATE/1639054469, 1639054469
com.propfinancing.puzzle.slitherlink.BoxWithDiagonals, true, true, false, false, com.propfinancing.puzzle.slitherlink.BoxWithDiagonals/2774485663, 2774485663
com.propfinancing.puzzle.slitherlink.Component, true, false, false, false, com.propfinancing.puzzle.slitherlink.Component/4011233562, 4011233562
com.propfinancing.puzzle.slitherlink.NumberedBox, true, true, false, false, com.propfinancing.puzzle.slitherlink.NumberedBox/1782628205, 1782628205
com.propfinancing.puzzle.slitherlink.Puzzle, true, false, false, false, com.propfinancing.puzzle.slitherlink.Puzzle/2584703185, 2584703185
com.propfinancing.puzzle.slitherlink.RectangularPuzzle, true, false, false, false, com.propfinancing.puzzle.slitherlink.RectangularPuzzle/3177548746, 3177548746
com.propfinancing.puzzle.slitherlink.RectangularWithDiagonalsPuzzle, true, false, false, false, com.propfinancing.puzzle.slitherlink.RectangularWithDiagonalsPuzzle/3793384887, 3793384887
java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873
java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647
java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611
java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131
java.util.ArrayList, true, true, false, false, java.util.ArrayList/4159755760, 4159755760
java.util.HashMap, true, true, false, false, java.util.HashMap/1797211028, 1797211028
java.util.LinkedHashMap, true, true, false, false, java.util.LinkedHashMap/3008245022, 3008245022
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-tool...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/d7ee6beb-815d-44ab-8a3f-c292ee198e27n%40googlegroups.com.
> Can you share the full contents of Line and Box? Or at least their class hierarchy and fields - methods are not important.
I am attaching pared-down versions of Component, Box, and Line.
I am also attaching the generated .gwt.rpc
> Something has definitely changed since your last email - "Line$STATUS" was present before,
> but isn't now. Was that a deliberate change?
Yes. I have been paring down my classes to see if I can find out what the GWT Compiler
does not like so no luck so far.
This is very interesting. I added Line as a private member to Box:
/** Testing a line instance */
private Line line;
And an accessor:
/** Test method for GWT */
public Line getLine() {
return line;
}
Now, Box is not generated in the .gwt.rpc file (Box Box$STATE is still there).
If I mark those two items with @GwtIncompatible, Box appears again.
Thank you,
Neil
--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!
From: Neil Aggarwal <ne...@propfinancing.com>
Sent: Thursday, December 19, 2024 10:45 PM
To: 'google-we...@googlegroups.com' <google-we...@googlegroups.com>
Subject: RE: Class not included in the set of types for RPC
> Can you share the full contents of Line and Box? Or at least their class hierarchy and fields - methods are not important.
I am attaching pared-down versions of Component, Box, and Line.
I am also attaching the generated .gwt.rpc
> Something has definitely changed since your last email - "Line$STATUS" was present before,
> but isn't now. Was that a deliberate change?
Yes. I have been paring down my classes to see if I can find out what the GWT Compiler
does not like so no luck so far.
Thank you,
> What about the Point class? Line and Point are missing in the policy file so I guess
> Point might be the issue (or something that Point references)
That was it!
Point referenced my own super-source version of Vector3f.
I forgot not mark Vector3f as Serializable.
Since it is super-source, it is not valid as-is so I excluded it from my
compile of my library.
The GWT compiler did not give me any errors or warnings so I did not
realize to look there.
I really think the RPC generator should not be silent here.
Puzzle references Point. Puzzle was processed and present in the .gwt.rpc file
but Point was not processed.
> Are you sure you have no compiler errors, and -failOnError (or -strict) is set?
No compiler errors. I changed Vector3f back to non-serializable and ran the
build. I am attaching the full output from Maven.
I have failOnError in my pom.xml:
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.1.0</version>
<extensions>true</extensions>
<configuration>
<failOnError>true</failOnError>
<logLevel>INFO</logLevel>
<moduleName>com._3dmathpuzzles.play.DiagonalSlitherlink</moduleName>
<systemProperties>
<gwt.persistentunitcachedir>${project.build.directory}/gwt</gwt.persistentunitcachedir>
</systemProperties>
</configuration>
</plugin>
> We can't see the code you won't share
I am willing to share, but my library is HUGE. It would not be useful to share it with you
until I pared it down to a test case. Luckily, it looks like that is not going to be necessary.
> this is effectively "black box" testing from our part
Understood. That is why I was trying to pare it down to a test case which would illustrate
what happened in a smaller subset of code.