Forum Discussion

rdilse's avatar
rdilse
New Contributor
5 years ago

Problems with Bouncy Castle library in groovy script

Hi, i'm trying to do some cryptographic operations (e.g. create private key, create certificate, write to pem files...) in a groovy test step. For these operations i'd like to use the bouncy castle lib in version 164.

 

The groovy script was tested with Intellij IDEA community 2019.3, where it works fine.

 

When i try to run the script in SoapUI 5.5.0, i get a lot of errors, e.g. "java.lang.NoSuchMethodError: org.bouncycastle.util.Strings.lineSeparator()Ljava/lang/String; error at line 79

 

Code in line 79: PemWriter pemWriter = new PemWriter(new OutputStreamWriter(outputStream));

 

Beside this error, there are other errors, e.g.:

lava.lang.VerifyError: class.org.bouncycastle.asn1.ASN1Primitive overrides final method equals.(Ljava/lang/Object;)Z

 

Who has experience with the combination of SoapUI with groovy and Bouncy Castle and could give helpful hints?

 

Best regards,

Reinhold

  • This can be possible if you stop loading the default library(move it from there) and add the updated library which you need. This may not be supported by the tool, but you may give a try.
  • nmrao's avatar
    nmrao
    Champion Level 3
    This can be possible if you stop loading the default library(move it from there) and add the updated library which you need. This may not be supported by the tool, but you may give a try.
    • rdilse's avatar
      rdilse
      New Contributor

      Hi Rao,

      thanks for your reply!

      In the meantime I did exacly what you recommended. I removed the default library (144) and added my current library (160) to the lib directory.

      Now it works.

       

      Best regards,

      Reinhold

      • ChipQC's avatar
        ChipQC
        New Contributor

        I'm facing the same problem. Could you show me how to remove the default library on SoapUI?