<![CDATA[CASDK-0041: An error occurred while invoking the REST endpoint.[[CloudInvocationException [ java.lang.ClassCastException: java.lang.ClassCastException: class org.bouncycastle.asn1.x509.SubjectPublicKeyInfo cannot be cast to class org.bouncycastle.openssl.PEMKeyPair (org.bouncycastle.asn1.x509.SubjectPublicKeyInfo and org.bouncycastle.openssl.PEMKeyPair are in unnamed module of loader 'app') ]]].The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the server side, but the target service could not be more specific on what the exact problem is. You can trace the cURL representation of the request sent to the target service from the Oracle Integration Cloud server logs. Try invoking the target service using cURL. If the problem persists, contact the target service admin.]]>
Cause of the Error
This error occurs due to a mismatch in the private key format. The key must be in PEM format for proper authentication.
Solution
Converting the private key to the correct PEM format will resolve this issue. Use the following command to perform the conversion:
ssh-keygen -p -f <KEY> -N '' -t rsa -m pem
Replace <KEY>
with the actual private key file name.
Conclusion
If you face this issue in Oracle Cloud OIC, ensure your private key is in the correct PEM format. This simple conversion step can save valuable troubleshooting time and ensure smooth integration execution.