I get a certificate error while querying REST API using requests module in python with Jython interpreter

My VM is setup with Java 17, matillion instance is using the same.

requests.exceptions.ConnectionError: ('Connection aborted.', error(-1, u'Unmapped exception: java.lang.IllegalAccessException: class org.python.core.PyReflectedFunction cannot access class sun.security.x509.X509CertImpl (in module java.base) because module java.base does not export sun.security.x509 to unnamed module @36aa52d2')) in <script> at line number 101

We solved this with a workaround, earlier we had a single script which used to make REST API as well as Database calls, and had to use Jython interpreter, now we separated it into two components, the REST API with Python and Database connection with Jython interpreter and it works.

Hi @Varada​, I'm glad to hear you were able to find a work around and thanks so much for sharing it with everyone!

Many thanks,

Claire