iText/BouncyCastle ClassNotFound org.bouncycastle.asn1.DEREncodable and org.bouncycastle.tsp.TimeStampTokenInfo

后端 未结 8 745
天命终不由人
天命终不由人 2020-11-29 06:52

I\'m trying to use iText Java. When you run the example \"how to sign\" the following error occurs:

Caused by: java.lang.ClassNotFoundException: org.bouncyca         


        
8条回答
  •  无人及你
    2020-11-29 07:12

    BouncyCastle libs are undergoing heavy API changes that broke the compatibility with other libs like iText.

    Either

    • use a previous version of BouncyCastle libs. Old versions can be found here. However, you'll have to find the right version of iText that was compatible with this particular version of BC.

    • make your own build of iText (the SVN trunk has been fixed). iText can be build with Maven (there's a short readme file at the root of the SVN). Please note that it's at your own risk, there may be bugs in trunk.

    • wait for the next version of iText. From my experience, iText releases come every couple of months, sometime more often, sometimes less. I'm not an iText committer though, so I can't give you any ETA.

    More information can be found in this thread

提交回复
热议问题