× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




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.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.