Friday, June 29, 2018

Re: GWT RPC file name in ClassNotFoundException

The beginning of the payload all looks correct, and it won't be possible for us to fully decode it and see what is wrong without the sources of the various objects mentioned.
But the format appears to be trying to send something impossible:

7 - "current version of the stream format"
0 - "no flags enabled"
96 - "there are 96 distinct strings in this stream"
...
1 - "the moduleBaseUrl is the first string", aka http://vagrant.ptcnet.ptc.com:2280/Windchill/gwt/com.ptc.windchill.wncgwt.WncGWT/
2 - "the name of the serialization policy file is the second string", aka 1C2DD3E7BC435105789300F99C966F9B
3 - "the name of the RPC interface is the third string", aka com.ptc.cat.ops.client.internal.OperationDispatcher
4 - "the name of the RPC method to call is the fourth string", aka "dispatch"
1 - "there is one argument to this method"
5 - "the class of the first argument to the method is the fifth string" aka java.util.ArrayList/4159755760
5 - "the class of the next object to read (i.e. the only argument to the dispatch() method) is the fifth string" aka java.util.ArrayList/4159755760
1 - "the array list first reads its size from the stream" aka the ArrayList only has one object
6 - "the class of the next object to read (the first and only object in the ArrayList) is the sixth string" aka com.ptc.windchill.enterprise.dsb.client.ops.StructureCompareOperation$StructureCompareOperationParams/619250753
7 - (now we're just guessing, since I don't have the sources for StructureCompareOperationParams, etc) "the class if the first field in StructureCompareOperationParams is the seventh string" aka com.extjs.gxt.ui.client.core.FastMap/3488076414
26 - "the Map_CustomFieldSerializerBase indicates that the next int is the count of items in the map" aka 26 items in the FastMap field of StructureCompareOperationParams
8 - "the first key in the map is an object with class of the 8th string", aka java.lang.String/2004016611 (we're probably going to see 25 more strings representing each key...
9 - "the first key's string value is the 9th string in the stream" aka the key has a value of SOURCE_NCID
8 - "the first value in the map is an object with the class of the 8th string", aka String again
10 - "the first value in the map is the 10th string in the stream" aka the value is -105227984815700591

etc. Guessing beyond this point is tedious and hazard fraught without concrete specifics. Some of this can be confirmed from your original stack trace:

Caused by: com.google.gwt.user.client.rpc.SerializationException: java.lang.ClassNotFoundException: 1C2DD3E7BC435105789300F99C966F9B
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:708)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readObject(ServerSerializationStreamReader.java:592)
    at com.google.gwt.user.server.rpc.core.java.util.Arrays$ArrayList_ServerCustomFieldSerializer.instantiate(Arrays.java:71)
    at com.google.gwt.user.server.rpc.core.java.util.Arrays$ArrayList_ServerCustomFieldSerializer.instantiateInstance(Arrays.java:106)
    at com.google.gwt.user.server.rpc.core.java.util.Arrays$ArrayList_ServerCustomFieldSerializer.instantiateInstance(Arrays.java:39)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.instantiate(ServerSerializationStreamReader.java:1088)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:682)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readObject(ServerSerializationStreamReader.java:592)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(ServerSerializationStreamReader.java:149)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:434)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeClass(ServerSerializationStreamReader.java:832)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:903)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeClass(ServerSerializationStreamReader.java:861)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:903)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeClass(ServerSerializationStreamReader.java:861)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:903)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:687)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readObject(ServerSerializationStreamReader.java:592)
    at com.google.gwt.user.server.rpc.core.java.util.Collection_ServerCustomFieldSerializerBase.deserialize(Collection_ServerCustomFieldSerializerBase.java:38)
    at com.google.gwt.user.server.rpc.core.java.util.ArrayList_ServerCustomFieldSerializer.deserialize(ArrayList_ServerCustomFieldSerializer.java:40)
    at com.google.gwt.user.server.rpc.core.java.util.ArrayList_ServerCustomFieldSerializer.deserializeInstance(ArrayList_ServerCustomFieldSerializer.java:54)
    at com.google.gwt.user.server.rpc.core.java.util.ArrayList_ServerCustomFieldSerializer.deserializeInstance(ArrayList_ServerCustomFieldSerializer.java:33)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:884)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:687)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readObject(ServerSerializationStreamReader.java:592)

Reading from the bottom, the first readObject is indeed an ArrayList, the second object has no custom field serializer (probably your StructureCompareOperationParams). Since the third readObject is an Arrays.ArrayList (i.e. results of Arrays.asList) instance, chances are the FastMap field in StructureCompareOperationParams was successfully deserialized, and the stream moved on to a later field in StructureCompareOperationParams with a List type? But as we can see here, whatever it attempted to deserialize at that point incorrectly pointed to string "2" rather than some later string, suggesting that the versions on client and server are either out of sync, the payload was modified incorrectly, there is a broken CustomFieldSerializer somewhere in your project or its dependencies, or somehow you've run into a bug in GWT.

There are only 5 occurences of "|2|" in your payload other than the correct first one, I'd imagine that one of those is suspect. or at least will point you in the right direction for what went wrong. Keep in mind that there is nothing inherently insidious about seeing a "2" - it might be the number 2, or the 3rd (zero indexed) value in some enum, or an indication that some collection has 2 items in it. It is also _very_ unlikely that some other string in your payload actually has that same value, but it is technically possible.

Using your own sources you can go over the payload to work this out, but focus on the failing readInt() which returns 2, and see which writeInt(2) on the client caused this bad data to be emitted. Given that GwtHandlerAdapter.processCall is custom, I'd also take a very close look there (or at any other proxy/filter) to see if it could possibly modify the payload in any way.

On Wednesday, June 27, 2018 at 2:04:08 AM UTC-5, DK wrote:
GwtHandlerAdapter class extends the RemoteServiceServlet class and overrides its processCall(String payload) method.

The overriden method only throws error when the payload value is:

7|0|96|http://vagrant.ptcnet.ptc.com:2280/Windchill/gwt/com.ptc.windchill.wncgwt.WncGWT/|1C2DD3E7BC435105789300F99C966F9B|com.ptc.cat.ops.client.internal.OperationDispatcher|dispatch|java.util.ArrayList/4159755760|com.ptc.windchill.enterprise.dsb.client.ops.StructureCompareOperation$StructureCompareOperationParams/619250753|com.extjs.gxt.ui.client.core.FastMap/3488076414|java.lang.String/2004016611|SOURCE_NCID|-105227984815700591|TARGET_NCID|-7516521843859502960|SOURCE_CACHEID|184184|TARGET_CACHEID|184185|SOURCE_ROOT_STRUCTURE_MODEL|com.ptc.cat.entity.client.structure.SimpleMasteredStructureModel/714351732|com.ptc.cat.entity.client.nav.internal.DefaultNavigable/1488927308|com.ptc.cat.entity.client.internal.ServerIdentifier/44651098|wt.part.WTPartMaster|156180|java.util.LinkedList/3953877921|com.ptc.cat.entity.client.ParentInfo/148369529|masterReference|wt.part.WTPart|174404|PART_USES|http://vagrant.ptcnet.ptc.com:2280/Windchill/wtcore/images/part.gif|Part|TARGET_ROOT_STRUCTURE_MODEL|SOURCE_STRUCTURE_MODEL|TARGET_STRUCTURE_MODEL|SOURCE_ATTRIBUTE_MAPPER|com.ptc.cat.entity.client.attribute.AttributeMapper/4173695238|identityBuilder|FILTERED_PART_BUILD_RULE_EPMDOCS|com.ptc.cat.entity.client.attribute.Attribute/1120602003|com.ptc.cat.entity.client.structure.AbstractStructureModel$StructureModelLocation/351430279|Child|SUBSTITUTE_PARTS|AXL_PART_DESCRIBE_DOCS|AVL_NAV_PARAMS|MFR_TO_VEN_NAV_CONSTANT|AXL_PART_REFERENCE_DOCS|REFERENCE_DOCS|CAD_DESCRIBE_DOCS|AML_NAV_PARAMS|DESCRIBE_DOCS|FILTERED_PART_BUILD_RULE_ASSOCIATION_EPMDOCS|ALTERNATE_PARTS|FILTERED_PART_BUILD_HISTORY_EPMDOCS|TARGET_ATTRIBUTE_MAPPER|SOURCE_ATTRIBUTES|TARGET_ATTRIBUTES|IS_INITIATED_FROM_LEFT|java.lang.Boolean/476441737|COMPARE_SUMMARIES_CACHE_ID|0.84591641254933151530079253572|SOURCE_CONTEXT_INFOS|TARGET_CONTEXT_INFOS|SORT_BY_SOURCE|SOURCE_SORT_INFOS|[Lcom.ptc.cat.gxt.client.data.AttributeSortInfo;/3159444690|com.ptc.cat.gxt.client.data.AttributeSortInfo/2832941857|com.extjs.gxt.ui.client.Style$SortDir/3873584144|TARGET_SORT_INFOS|SOURCE_NAV_TYPE_NAMES|java.util.HashSet/3273092938|TARGET_NAV_TYPE_NAMES|SOURCE_SOURCING_CONTEXT_ID|TARGET_SOURCING_CONTEXT_ID|SOURCE_STARTING_PATH|com.ptc.cat.entity.client.CATNodePath/4282519304|TARGET_STARTING_PATH|COMPARE_OPTIONS|{}|graphBuilder|com.ptc.windchill.enterprise.part.structureCompare.server.graph.SCGraphBuilder|applicationName|com.ptc.windchill.enterprise.part.structureCompare.StructureCompare|differenceCalculator|com.ptc.windchill.enterprise.dsb.server.graph.DSBDifferenceCalculator|java.util.HashMap/1797211028|wt.part.WTPartReferenceLink|wt.part.WTPartDescribeLink|wt.part.WTPartAlternateLink|wt.part.WTPartSubstituteLink|com.ptc.windchill.suma.axl.AXLEntry|wt.epm.build.EPMBuildRule|wt.epm.build.EPMBuildHistory|wt.epm.structure.EPMDescribeLink|com.extjs.gxt.ui.client.core.FastSet/2139705081|java.util.Arrays$ArrayList/2507071751|com.ptc.cat.ops.client.DefaultCommandMapPopulator/3331120601|com.ptc.windchill.enterprise.dsb.client.ops.StructureCompareOperation|1|2|3|4|1|5|5|1|6|7|26|8|9|8|10|8|11|8|12|8|13|8|14|8|15|8|16|8|17|18|0|19|0|0|0|20|21|0|22|23|1|24|25|25|20|26|0|27|0|0|0|19|5|1|-14|0|0|20|26|0|27|0|0|0|0|2057|0|28|0|0|5|0|1|29|30|0|0|-19|8|31|18|0|19|0|0|0|20|21|0|22|23|1|24|24|25|20|26|0|27|0|0|0|19|5|1|-25|0|0|-21|0|0|0|0|2057|0|28|0|0|5|0|1|29|30|0|0|-30|8|32|-13|8|33|-24|8|34|35|7|0|7|1|8|36|7|14|8|37|38|36|0|0|0|0|0|39|40|0|8|41|38|36|0|0|0|0|0|-43|0|8|42|38|36|0|0|0|0|0|-43|0|8|43|38|36|0|0|0|0|0|-43|0|8|44|38|36|0|0|0|0|0|-43|0|8|45|38|36|0|0|0|0|0|-43|0|8|46|38|36|0|0|0|0|0|-43|0|8|47|38|36|0|0|0|0|0|-43|0|8|48|38|36|0|0|0|0|0|-43|0|8|49|38|36|0|0|0|0|0|-43|0|8|50|38|36|0|0|0|0|0|-43|0|8|51|38|36|0|0|0|0|0|-43|0|8|52|38|36|0|0|0|0|0|-43|0|8|28|38|36|0|0|0|0|0|-43|0|8|53|35|7|0|7|1|-39|7|14|-41|38|36|0|0|0|0|0|-43|0|-44|38|36|0|0|0|0|0|-43|0|-46|38|36|0|0|0|0|0|-43|0|-48|38|36|0|0|0|0|0|-43|0|-50|38|36|0|0|0|0|0|-43|0|-52|38|36|0|0|0|0|0|-43|0|-54|38|36|0|0|0|0|0|-43|0|-56|38|36|0|0|0|0|0|-43|0|-58|38|36|0|0|0|0|0|-43|0|-60|38|36|0|0|0|0|0|-43|0|-62|38|36|0|0|0|0|0|-43|0|-64|38|36|0|0|0|0|0|-43|0|-66|38|36|0|0|0|0|0|-43|0|-68|38|36|0|0|0|0|0|-43|0|8|54|5|1|-42|8|55|5|1|-75|8|56|57|1|8|58|8|59|8|60|0|8|61|0|8|62|57|1|8|63|64|1|65|36|57|0|0|57|0|0|66|1|0|8|67|64|1|65|36|57|0|0|57|0|0|-106|0|8|68|7|2|-56|69|1|-13|-68|69|1|-13|8|70|7|2|-56|69|1|-24|-68|69|1|-24|8|71|0|8|72|0|8|73|74|1|18|0|-14|0|0|0|-19|0|0|0|2056|0|28|0|0|5|0|1|29|30|0|0|-19|8|75|74|1|18|0|-25|0|0|0|-30|0|0|0|2056|0|28|0|0|5|0|1|29|30|0|0|-30|8|76|8|77|7|3|8|78|8|79|8|80|8|81|8|82|8|83|0|0|0|5|1|-42|0|0|14|0|84|0|1|0|0|5|8|8|85|8|86|8|87|8|88|8|89|8|90|8|91|8|92|0|0|1|-1|93|2|-56|-68|81|0|0|0|0|0|0|0|0|0|94|2|-13|-24|0|0|1|0|1|0|0|0|200|14|95|0|0|0|0|5|2|-21|-21|1|0|81|10|0|0|-21|0|0|1|0|96|1|

For other payloads it do not throw any error.
 

On Tuesday, June 26, 2018 at 11:53:30 AM UTC+5:30, Thomas Broyer wrote:
What does com.ptc.mvc.gwt.GwtHandlerAdapter do? Could it be responsible for this behavior?

--
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 post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment