-
1. Re: Problem with Errai Marshalling
csa Feb 17, 2015 1:48 PM (in response to nikhilraj)Hi,
It seems you have Jackson marshalling enabled on the client. Is this correct? ^Value is actually pointing to Errai's build-in marshalling format which is transformed to Jackson (if enabled), thereby removing all Errai-specific qualifiers.
I just tested marshalling a list with 2000 objects without any problem. So my assumption is that there's a structural difference in your working and failing cases. Can you provide more details or a way for us to reproduce?
Cheers,
Christian
-
2. Re: Problem with Errai Marshalling
nikhilraj Feb 24, 2015 5:21 AM (in response to csa)Hi,
Yes, I do have Jackson marshaling enabled on the client. I think that the issue has to do with the overall size of the resulting JSON rather than the actual size of the list. Could you please have a look at the attached file containing the JSON output produced for a list containing ~500 heavy weight objects?
It should not be due to any structural difference as the same service call succeeds if I split the exact same list into chunks of 50 objects without any other change in the client or server components.
Don't know if this would be of help to you - In the attached file, you can see the '^Value' text once and its position shifts around based on the size of the list. But when I doubled the size of the same list, the '^Value' text appeared twice.
Regards,
Nikhil
-
3. Re: Problem with Errai Marshalling
csa Feb 20, 2015 1:36 PM (in response to nikhilraj)1 of 1 people found this helpfulHi,
Here's what you can do so we can reproduce this:
String erraiJson = Marshalling.toJson(yourList);
String jackson = JacksonTransformer.toJackson(erraiJson);
If you could attach both Strings we should be able to reproduce this on our end. Of course, it would be even easier if you could step through the .toJackson call and see why there' s ^Value left-over.
Thanks,
Christian
-
4. Re: Re: Problem with Errai Marshalling
nikhilraj Feb 24, 2015 5:21 AM (in response to csa)Hi,
Please find the strings in the attached files.
I shall, as you have suggested, try to step through the code and find out the cause for this. But the size of the strings have been posing an issue till now.
Thanks,
Nikhil
-
5. Re: Problem with Errai Marshalling
csa Feb 23, 2015 5:52 PM (in response to nikhilraj)Thanks! I was able to reproduce and fix the issue now. Upgrading to 3.1.2-SNAPSHOT (or 3.2.0-SNAPSHOT) will resolve this.
The problem was actually caused by an object id collision in the payload. If you search for ObjectID": "563" in your erraiJson you will find a PlotModel and a BigInteger with the same id. These ids are used for resolving back references so we can avoid unnecessary duplication in the payload.
Cheers,
Christian
-
6. Re: Problem with Errai Marshalling
nikhilraj Feb 24, 2015 5:20 AM (in response to csa)Thanks a lot!
Cheers,
Nikhil