cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with Bouncy Castle library in groovy script

SOLVED
Highlighted
New Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Problems with Bouncy Castle library in groovy script

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.


Regards,
Rao.

View solution in original post

4 REPLIES 4
Highlighted
Community Hero

Re: Problems with Bouncy Castle library in groovy script

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.


Regards,
Rao.

View solution in original post

Highlighted
New Contributor

Re: Problems with Bouncy Castle library in groovy script

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

Highlighted
New Contributor

Re: Problems with Bouncy Castle library in groovy script

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

Highlighted
New Contributor

Re: Problems with Bouncy Castle library in groovy script

Nevermind, I found it.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors