InvocationTargetException in WebMethods

If you are using DidiSoft OpenPGP Library for Java in a  Software AG WebMethods project you may encounter strange exceptions like:

java.lang.reflect.InvocationTargetException:org.bouncycastle.util.Arrays.constantTimeAreEqual

The reason for such exceptions is that WebMethods ships with an older version of the BouncyCastle jar files and a class loading mismatch occurs.

The resolution is to remove the default BouncyCastle jar files from the WebMethods class path and use only the version that ships with DidiSoft OpenPGP Library for Java.