Avoid cyclic inheritance of links in rake

I have a big project written in Grails 2.3.8. Sometimes, when I deploy it using my CI, I get this message:

Annotation verification for the web application [/ ProjectName ## 1152] failed due to StackOverflowError.

Possible root causes include setting too low for -Xss and illegal circular inheritance dependencies. The processed class hierarchy was [org.bouncycastle.asn1.ASN1EncodableVector-> org.bouncycastle.asn1.DEREncodableVector-> org.bouncycastle.asn1.ASN1EncodableVector]

I have already increased the Xss settings, but it’s clear, but maybe I'm mistaken that there is a circular reference: org.bouncycastle.asn1.ASN1EncodableVector-> org.bouncycastle.asn1.DEREncodableVector-> org.bouncycastle.asn1.ASN1EncodableVector

I am red that you can just avoid checking, I cannot delete the library because I need it. But I do not know how to do this in Grail. I can exclude them, but that’s not what I want.

Thanks so much for any advice.

NIBE

UPDATE I just solved the problem. I delete all traces of the bouncycastle library in the buildConfig file. No trace in dependecy or exclude. Just add the crypto.2.0 plugin and everything will be fine!

+6
source share
1 answer

I think this is because the two versions of the JAR reference the class path.

This usually happens when loading different versions of bcprov-jdk * .jar .

For example, IN one of my scenario - I had ..../webapps/FOO/WEB-INF/lib/bcprov-jdk15on-147.jar ..../webapps/FOO/WEB-INF/lib/bcprov-jdk15on-1.51.jar 

I got this solution after removing any of them from my class path.

+8
source

Source: https://habr.com/ru/post/970025/


All Articles