Did you separate the modules in: - client - shared - server
... with its own classpath? Or did you put them together in *one project with one classpath*? The latter is not good, because you may get "classpath hell" so GWT transpiler uses wrong libs to transpile the Java code. I definitely would try to separate the modules... also because you said, that in a small stand-alone project the mechanism works well. Hope this helps, Lofi [email protected] schrieb am Mittwoch, 30. September 2020 um 10:07:33 UTC+2: > As an experiment, I would try changing the "offset" parameter type from > "Integer" to "int" in both versions of the method. > You can also try deleting all gwt-unitCache files. > > понедельник, 28 сентября 2020 г. в 12:43:11 UTC+4, [email protected]: > >> I have a large GWT app and we've been stuck on GWT 2.7 for years. If I >> try to update to 2.8 or 2.9, a random selection of our GWT-RPC calls are >> not encoded properly by the client. Certain fields in the request become >> 'undefined' (example below), and cannot be decoded. >> >> We *REALLY* want to upgrade to 2.9, and I am at a loss as to how to fix >> this. At this point. I will happily award a *$1000 bounty* for a good >> solution! >> >> An example (no rhyme or reason to the types of RPC arguments, this is >> just the first one we make but many simpler RPCs fail as well well. >> >> RPC Signature: >> >> public User authenticate(String sessionKey, Integer offset) throws >> NotLoggedInException; >> >> *GWT 2.7:* >> >> 7|0|6| >> http://127.0.0.1:8888/cronometer/|32DF1A25F01F1EA26BACD86E081E664C|com.cronometer.client.CronometerService|authenticate|java.lang.String/2004016611|java.lang.Integer/3438268394|1|2|3|4|2|5|6|0| >> 6|-420| >> >> *GWT-2.8, 2.9:* >> >> 7|0|6| >> http://127.0.0.1:8888/cronometer/|32DF1A25F01F1EA26BACD86E081E664C|com.cronometer.client.CronometerService|authenticate|java.lang.String/2004016611|java.lang.Integer/3438268394|1|2|3|4|2|5|6|0| >> undefined|undefined| >> >> >> The request encoding sent to server is identical here except the last two >> items have changed to 'undefined'. >> >> >> This causes decoding to fail with: >> >> WARN 16:40:14.014 [qtp756508433-309] / - Exception while dispatching >> incoming RPC call >> >> java.lang.NumberFormatException: Expected type 'int' but received a >> non-numerical value: undefined >> >> at >> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.getNumberFormatException( >> ServerSerializationStreamReader.java:1027) >> >> at >> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt( >> ServerSerializationStreamReader.java:551) >> >> at >> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readString( >> ServerSerializationStreamReader.java:607) >> >> at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:286) >> >> >> Another illustrative example: >> >> void setParam(String sessionKey, String val) throws NotLoggedInException; >> >> 7|0|7| >> http://127.0.0.1:8888/cronometer/|32DF1A25F01F1EA26BACD86E081E664C|com.cronometer.client.CronometerService|setParam|java.lang.String/2004016611|a358-6aa3-ca6a-daca-308a-3a30-503a-4a50|http://127.0.0.1:8888/|1|2|3|4|2|5| >> undefined|6|7| >> >> Again, one of the fields in the request is not set right. >> >> Does anyone have any ideas what's wrong here or how to fix it? >> >> I would log a bug but I cannot reproduce this when I make a small test >> project and copy an individual RPC example. >> >> >> >> -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/116dc06e-eeb4-4aa5-9324-1df31cc287ccn%40googlegroups.com.
