<div dir="ltr">Been digging into this some more and turns out there's a pretty nasty bug [1] in the way we our caches are implemented. It's a simple fix though and will be resolved for 1.7. <div><br></div><div>[1] <a href="https://issues.jboss.org/browse/KEYCLOAK-2179">https://issues.jboss.org/browse/KEYCLOAK-2179</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 1 December 2015 at 10:40, Stian Thorgersen <span dir="ltr"><<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">We can make those classes serializable. Create a JIRA for it. It's to late for 1.7 release though so won't be fixed until 1.8. <div><br></div><div>We also don't do any testing with ASYNC (as we know it will be problematic, especially since Keycloak doesn't require sticky sessions) or replicated caches, as we recommend using sync + invalidation caches.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 30 November 2015 at 17:56, Lohitha Chiranjeewa <span dir="ltr"><<a href="mailto:kalc04@gmail.com" target="_blank">kalc04@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I agree that there could be inconsistent behavior with ASYNC mode depending on what your use case is. </p>
<p dir="ltr">However, shouldn't the classes I mentioned be made serializable in any case? They are directly referenced from the classes inside infinispan cache model package.</p><div><div>
<div class="gmail_quote">On Nov 30, 2015 7:56 PM, "Stian Thorgersen" <<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I wouldn't not recommend setting async as you may get unpredictable behavior</div><div class="gmail_extra"><br><div class="gmail_quote">On 30 November 2015 at 15:07, Lohitha Chiranjeewa <span dir="ltr"><<a href="mailto:kalc04@gmail.com" target="_blank">kalc04@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes, the 'mode' of 'realms' and 'users' caches were changed to 'ASYNC'. This causes the app to store the invalidations temporarily w/o sending to other nodes and flush them all only when a threshold value is arrived. I think this storage method causes the Serialization issue.<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 30, 2015 at 7:30 PM, Bill Burke <span dir="ltr"><<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Did you change caching configuration?<span><br>
<br>
On 11/30/2015 8:50 AM, Lohitha Chiranjeewa wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
Issue came up with Realm and User caches. Not User Sessions.<br>
<br>
On Mon, Nov 30, 2015 at 7:17 PM, Bill Burke <<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a><br></span><span>
<mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>>> wrote:<br>
<br>
Or is this related to UserSession cache?<br>
<br>
On 11/30/2015 8:45 AM, Bill Burke wrote:<br>
> We don't replicate at all. Why would this be an issue?<br>
><br>
> On 11/30/2015 8:41 AM, Lohitha Chiranjeewa wrote:<br>
>> When Infinispan caching is enabled in ASYNC mode, exceptions get<br>
logged<br>
>> at startup due to serialization issues. Basically the following<br>
classes<br>
>> have to implement the Serialiazable interface:<br>
>><br>
>> org.keycloak.models.OTPPolicy<br>
>> org.keycloak.models.<br>
>> RequiredActionProviderModel<br>
>><br>
>> There could be other classes as well.<br>
>><br>
>> Is this already fixed in 1.7.0 code or shall I put a JIRA?<br>
>><br>
>><br>
>> Regards,<br>
>> Lohitha.<br>
>><br>
>><br>
>> _______________________________________________<br>
>> keycloak-user mailing list<br></span>
>> <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> <mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>><span><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
>><br>
><br>
<br>
--<br>
Bill Burke<br>
JBoss, a division of Red Hat<br>
<a href="http://bill.burkecentral.com" rel="noreferrer" target="_blank">http://bill.burkecentral.com</a><br>
_______________________________________________<br>
keycloak-user mailing list<br></span>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> <mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
<br>
<br>
</blockquote><div><div>
<br>
-- <br>
Bill Burke<br>
JBoss, a division of Red Hat<br>
<a href="http://bill.burkecentral.com" rel="noreferrer" target="_blank">http://bill.burkecentral.com</a><br>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>