title: Avoid cyclic reference inheritance in grails
body: <p>I have a big project written in Grails 2.3.8. Sometimes when I deploy it using my CI I got this message:</p>
  
  <p><strong>Unable to complete the scan for annotations for web application [/ProjectName##1152] due to a StackOverflowError.</strong></p>
  
  <p><strong>Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. 
  The class hierarchy being processed was</strong>
   <strong>[org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector]</strong></p>
  
  <p>I have already increased the Xss settings, but it's clear, but maybe I'm wrong, that there is a cyclic reference :
  org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector</p>
  
  <p>I red that you can just avoid the checking, I cannot remove the library because I need it. But I have not idea how to do it in Grails. I can exclude them but it's not what I want.</p>
  
  <p>thanks a lot for any advices</p>
  
  <p>nibe</p>
  
  <p><strong>UPDATE</strong>
  I just fixed the issue. I remove every trace of bouncycastle library in the buildConfig file. No trace in dependecy or excludes. Just add the plug in crypto.2.0 and everything works fine!</p>