[kaffe] Kaffe Bug? DB2 JDBC Connection problem

BMonteiro at ilstechnology.com BMonteiro at ilstechnology.com
Tue Oct 24 15:34:42 PDT 2006


Hi.

I put together a simple JDBC app that uses the Driver Manager class to 
establish a connection to a DB2 Database.  When running on sun's JVM, it 
establishes the connection fine. 

When using kaffe,  I get the following error.

com.ibm.db2.jcc.a.DisconnectException: SocketException 'Unknown socket 
option' DB2ConnectionCorrelator: null
  at com.ibm.db2.jcc.b.fc.a (fc.java:394)
   at com.ibm.db2.jcc.b.fc.<init> (fc.java:66)
   at com.ibm.db2.jcc.b.a.v (a.java:254)
   at com.ibm.db2.jcc.b.b.a (b.java:1792)
   at com.ibm.db2.jcc.a.p.<init> (p.java:936)
   at com.ibm.db2.jcc.b.b.<init> (b.java:324)
   at com.ibm.db2.jcc.DB2Driver.connect (DB2Driver.java:165)
   at java.sql.DriverManager.getConnection (DriverManager.java:164)
   at Db2JDBCConnect.run (Db2JDBCConnect.java:37)
   at java.lang.VMThread.run (VMThread.java:123)

 This problem occurs only with DB2. 

Seems like a socket option needs to be set. I tried looking through the 
kaffe source code myself ( in particular the standard socket libraries 
PlainSocketImpl.c ) but i thought it might be easier for you to debug this 
issue

I know DB2 does a setSocketTimeout() as maybe something different from 
what the other databases drivers do, but I could be wrong. 

Attached is the source and bytecode for the simple jdbc app I compiled and 
ran on kaffe. (Again, this runs fine on suns java). The DB2 jdbc drivers 
are also attached. I built and installed the latest development release of 
kaffe 1.1.7 on Redhat Linux. 

You may have to modify the source Db2Test.java to point to a valid 
database server. 

To run the app: kaffe -classpath  db2jcc.jar: db2jcc_license_cu.jar:. 
Db2Test 

Please let  me know if there is a workaround and if some sections of the 
code need to be modified and the VM rebuilt.  Please let me know if you 
need more information.
Thanks for your help.

Sincerely,

Brennan Monteiro.



















 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://kaffe.org/pipermail/kaffe/attachments/20061024/8d5fe69f/attachment-0004.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DB2Test.java
Type: application/octet-stream
Size: 321 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20061024/8d5fe69f/attachment-0006.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DB2Test.class
Type: application/octet-stream
Size: 322 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20061024/8d5fe69f/attachment-0007.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Db2JDBCConnect.java
Type: application/octet-stream
Size: 1839 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20061024/8d5fe69f/attachment-0008.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Db2JDBCConnect.class
Type: application/octet-stream
Size: 1498 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20061024/8d5fe69f/attachment-0009.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: db2jcc_license_cu.jar
Type: application/octet-stream
Size: 1013 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20061024/8d5fe69f/attachment-0010.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: db2jcc.jar
Type: application/octet-stream
Size: 1191149 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20061024/8d5fe69f/attachment-0011.obj 


More information about the kaffe mailing list