title: Connect to DB2 via JayDeBeApi JDBC in Python
body: <p>I've been struggling for a while to connect to DB2 via Python client on OSX (maveriks). A valid option seem to be using JayDeBeApi but, running the following code...</p>
  
  <pre><code>import jaydebeapi
  import jpype
  
  jar = '/opt/IBM/db2/V10.1/java/db2jcc4.jar' # location of the jdbc driver jar
  args='-Djava.class.path=%s' % jar
  jvm = jpype.getDefaultJVMPath()
  jpype.startJVM(jvm, args)
  
  jaydebeapi.connect('com.ibm.db2.jcc.DB2Driver',
  'jdbc:db2://server:port/database','myusername','mypassword')
  </code></pre>
  
  <p>I'll get the following error</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;pyshell#67&gt;", line 2, in &lt;module&gt;
      'jdbc:db2://server:port/database','myusername','mypassword')
    File "/Library/Python/2.7/site-packages/jaydebeapi/dbapi2.py", line 269, in connect
      jconn = _jdbc_connect(jclassname, jars, libs, *driver_args)
    File "/Library/Python/2.7/site-packages/jaydebeapi/dbapi2.py", line 117, in _jdbc_connect_jpype
      return jpype.java.sql.DriverManager.getConnection(*driver_args)
  com.ibm.db2.jcc.am.SqlSyntaxErrorExceptionPyRaisable: com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][t4][10205][11234][3.63.123] Null userid is not supported. ERRORCODE=-4461, SQLSTATE=42815
  </code></pre>
  
  <p>So basically I'm connecting to the server, but for some reason I'm not using the username &amp; password provided. Any idea on how to pass correctly username and password? I can't find further specification for this problem exactly, and any suggestion or tips are welcome. </p>