Hi Guys,
I am currently working on a RPG program which uses JDBC, via JNI, to connect to a MS SQL database.
The basic program and supporting service program was provided in an article by Skott Klement: 
http://systeminetwork.com/article/access-ms-sql-server-database-rpg-program
I have installed the driver and attempted to connect to the database - the connection is attempted by I get the following errors:
8/01/2009 10:27:11 com.microsoft.sqlserver.jdbc.TDSChannel enableSSL                                                             
WARNING: TDSChannel ( ConnectionID:1 TransactionID:0x0000000000000000) SSL handshake failed: null                                
com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure
 Sockets Layer (SSL) encryption. Error: null.                                                                                    
        at java.lang.Throwable.<init>(Throwable.java:195)                                                                        
        at java.lang.Exception.<init>(Exception.java:41)                                                                         
        at java.sql.SQLException.<init>(SQLException.java:40)                                                                    
        at com.microsoft.sqlserver.jdbc.SQLServerException.<init>(Unknown Source)                                                
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(Unknown Source)                                            
        at com.microsoft.sqlserver.jdbc.TDSChannel.throwSSLConnectionFailed(Unknown Source)                                      
        at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(Unknown Source)                                                     
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)                                        
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)                                 
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)                                              
        at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)                                                      
Can anybody give me some insight into what is failing here? We use SSL for other woprk so I'm certain it is configured correctly on our System i.
Here are some salient points of info:
java version:                                                            
java version "1.4.2"                                                     
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_16-b05)    
Classic VM (build 1.4, build JDK-1.4, native threads, jitc_de)           
RPG Code:
     D connectString   s            256A   inz('jdbc:sqlserver://XXXX:1433')
         prop = JDBC_Properties();
         JDBC_setProp(prop: 'userName'     : 'xxxx');
         JDBC_setProp(prop: 'password'     : 'xxxx');
         JDBC_setProp(prop: 'databaseName' : 'xxxx');
         conn = JDBC_ConnProp('com.microsoft.sqlserver.jdbc.SQLServerDriver'
                             :%trim(connectString)
                             : prop );
Is the SQL server not listening on secure sockets? Can I try to connect without using SSL? Any ideas would be great! 
Cheers
Larry Ducie
_________________________________________________________________
Time for change? Find your ideal job with SEEK.
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2F%3Ftracking%3Dsk%3Atl%3Ask%3Anine%3A0%3Ahottag%3Achange&_t=757263783&_r=SEEK_tagline&_m=EXT
 
As an Amazon Associate we earn from qualifying purchases.