You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.
to make sure the reportFieldInstancesList is not populed by Jackson unmarshaller, caching-time is respected (please note the "ReportFieldInstance" changed in "ReportFieldInstance222");
So this is my assumption: if a sub-type of the returned object is a populated List, Robospice automatically skips caching. I hope I'm wrong but changing that single property made all the difference, so something weird's happening in the background.
It looks like your object is not getting put into cache, and because of that RoboSpice keeps executing a request every time because there's nothing in the cache. Must be some issue with Jackson serializing this 'ReportTemplateWrapper' object and fails to do so. RoboSpice writes detailed logs. Please explore a log in AndroidStudio to track down an error. And/or post a log here if needed. Log must begin from exact moment after this.getSpiceManager().execute(request, request.createCacheKey(), DurationInMillis.ONE_DAY, new ReportTemplatesRequestRequestListener(this)) is called.
hi @mykolaj you're absolutely right. I forgot to update the issue as it took me a day to figure out the source of the problem.
I had to dig deeper to find out why the same exact SpiceRequest failed on Samsung devices while it didn't on other devices, and narrowed it down to a class like the one below
Robospice invokes the Jackson method ObjectMapper.canSerialize that prevents the parsing from being carried out at all if any non-serializable field is found in the given object. In my case, failing silently on Samsung devices (and only on Samsung devices, ie on my Moto X it was carried out successfully).
In case it can help anyone: just adding the @JsonIgnore annotation fixed this (nightmare-ish) bug.
@JsonIgnoreprivateViewview;
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi
I think I narrowed down a nasty bug. I hope I'm wrong, but I made some pretty extensive testing in order to get down to this.
I'm using
Jackson2SpringAndroidSpiceService
which in turns useJackson2ObjectPersisterFactory
:Having a pretty simple situation like this
when i use
the
DurationInMillis.ONE_DAY
caching is not respected (I checked Apache's access logs and requests are logged each time).While if I change the definition to
to make sure the
reportFieldInstances
List
is not populed by Jackson unmarshaller, caching-time is respected (please note the "ReportFieldInstance" changed in "ReportFieldInstance222");So this is my assumption: if a sub-type of the returned object is a populated List, Robospice automatically skips caching. I hope I'm wrong but changing that single property made all the difference, so something weird's happening in the background.
Library versions:
The text was updated successfully, but these errors were encountered: