Error connecting with JDBCR4

Scott Klement's open source interface to using JDBC database drivers from RPG. http://www.scottklement.com/jdbc/
Post Reply
smittykid1
Posts: 3
Joined: Tue Jan 30, 2024 2:25 pm

Error connecting with JDBCR4

Post by smittykid1 »

I'm getting the following error from JDBCR4 when I attempt to connect to our MS SQL database, how would I go about troubleshooting the cause?

Thanks,
Michael Smith

Message . . . . : Java Virtual Machine is IBM Technology for Java.
PID(31290)
Cause . . . . . : JAVA_HOME environment variable is
/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit
40 01/30/24 09:53:01.830683 JDBCR4 CBPGPLSYS *STMT JDBCR4
From module . . . . . . . . : JDBCR4
From procedure . . . . . . : DRIVER_CONNPROP
Statement . . . . . . . . . : 4342
To module . . . . . . . . . : JDBCR4
To procedure . . . . . . . : DRIVER_CONNPROP
Statement . . . . . . . . . : 4342
Thread . . . . : 000005E6
Message . . . . : Unable to connect.
smittykid1
Posts: 3
Joined: Tue Jan 30, 2024 2:25 pm

Re: Error connecting with JDBCR4

Post by smittykid1 »

I attached the errors that I'm seeing when it tries to connect, it looks like it might be certificate related or some security setting
Java connection errors 1-30-24.png
Java connection errors 1-30-24.png (214.05 KiB) Viewed 1388 times
smittykid1
Posts: 3
Joined: Tue Jan 30, 2024 2:25 pm

Re: Error connecting with JDBCR4

Post by smittykid1 »

I was able to get this figured out with some research on here, by adding the following two lines of code I corrected the issue:

JDBC_setProp(prop: 'encrypt' : 'true');
JDBC_setProp(prop: 'trustServerCertificate' : 'true');
Post Reply