1

I connect to my db2 database with following URL:

jdbc:db2://myhost:9999/mydb:sslConnection=true;sslTrustStoreLocation=/home/my name/somekey.jks

using squirrel.

Now I'm trying to connect from python using jaydebeapi using the same URL string but it fails with

jpype._exception. SqlSyntaxErrorExceptionPyRaisable: com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][10165][10051][4.20.4] Invalid database URL syntax: jdbc:db2://myhost:9999/mydb:sslConnection=true;sslTrustStoreLocation=/home/my name/somekey.jks. ERRORCODE=-4461, SQLSTATE=42815

What is the recommended way to pass the key store file via jaydebeapi?

mustaccio
  • 18,234
  • 16
  • 48
  • 57
hadron
  • 457
  • 4
  • 19
  • All property key-value pairs in the URL should end with semicolons, including the last one. – mustaccio Apr 18 '16 at 13:47
  • Thanks for the suggestion, but I still get the same error – hadron Apr 19 '16 at 08:22
  • Try the new JayDeBeApi 1.0.0 feature passing a dictionary with properties (sslConnection, sslTrustStoreLocation and user, password) instead. Read the docstring of the connect method carefully. – bastian Jan 21 '17 at 11:08

0 Answers0