<div dir="ltr">Been digging into this some more and turns out there&#39;s a pretty nasty bug [1] in the way we our caches are implemented. It&#39;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">&lt;<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>&gt;</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&#39;s to late for 1.7 release though so won&#39;t be fixed until 1.8. <div><br></div><div>We also don&#39;t do any testing with ASYNC (as we know it will be problematic, especially since Keycloak doesn&#39;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">&lt;<a href="mailto:kalc04@gmail.com" target="_blank">kalc04@gmail.com</a>&gt;</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&#39;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, &quot;Stian Thorgersen&quot; &lt;<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>&gt; 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&#39;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">&lt;<a href="mailto:kalc04@gmail.com" target="_blank">kalc04@gmail.com</a>&gt;</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 &#39;mode&#39; of &#39;realms&#39; and &#39;users&#39; caches were changed to &#39;ASYNC&#39;. 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">&lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;</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 &lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a><br></span><span>
&lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;&gt; wrote:<br>
<br>
    Or is this related to UserSession cache?<br>
<br>
    On 11/30/2015 8:45 AM, Bill Burke wrote:<br>
     &gt; We don&#39;t replicate at all.  Why would this be an issue?<br>
     &gt;<br>
     &gt; On 11/30/2015 8:41 AM, Lohitha Chiranjeewa wrote:<br>
     &gt;&gt; When Infinispan caching is enabled in ASYNC mode, exceptions get<br>
    logged<br>
     &gt;&gt; at startup due to serialization issues. Basically the following<br>
    classes<br>
     &gt;&gt; have to implement the Serialiazable interface:<br>
     &gt;&gt;<br>
     &gt;&gt; org.keycloak.models.OTPPolicy<br>
     &gt;&gt; org.keycloak.models.<br>
     &gt;&gt; RequiredActionProviderModel<br>
     &gt;&gt;<br>
     &gt;&gt; There could be other classes as well.<br>
     &gt;&gt;<br>
     &gt;&gt; Is this already fixed in 1.7.0 code or shall I put a JIRA?<br>
     &gt;&gt;<br>
     &gt;&gt;<br>
     &gt;&gt; Regards,<br>
     &gt;&gt; Lohitha.<br>
     &gt;&gt;<br>
     &gt;&gt;<br>
     &gt;&gt; _______________________________________________<br>
     &gt;&gt; keycloak-user mailing list<br></span>
     &gt;&gt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>&gt;<span><br>
     &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
     &gt;&gt;<br>
     &gt;<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> &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>&gt;<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>