I need to receive data from an external ms sqlserver. I use ms jdbc driver for this. The connection works, but only using the sql server user with login and password. For security reasons, we must use domain login in the company. I'm still having trouble with the error:
"Caused by: java.lang.UnsatisfiedLinkError: Unable to load authentication DLL mssql-jdbc_auth-12.8.1.x64 " "
From what I can see, Java in my windows system is 32 bit, windows system is 64 bit, in the as400 system we have 7.4, several versions of java. I put mssql-jdbc_auth-12.8.1.x64.dll and mssql-jdbc_auth-12.8.1.x86.dll into system32, sysWOW64, to the folder where I have the jar file mssql-jdbc-12.8.1.jre8.jar, I tried adding the command in the rpgle program itself like:
Code: Select all
jarPath = 'QIBM/UserData/Java400/ext/mssql-jdbc-12.8.1.jre8.jar';
monitor;
cmd = 'ADDENVVAR ENVVAR(QIBM_RPG_JAVA_PROPERTIES) ' +
'VALUE("-Djava.library.path=QIBM/UserData/Java400/ext/")';
sCall(%trimr(cmd):%len(%trimr(cmd)));
cmd = 'CHGENVVAR '+
'ENVVAR(CLASSPATH) VALUE('''+ %trim(jarPath) +''')';
sCall(%trimr(cmd):%len(%trimr(cmd)));
on-error;
monitor;
cmd = 'ADDENVVAR ENVVAR(CLASSPATH) ' +
' VALUE('''+ %trim(jarPath) +''')';
sCall(%trimr(cmd):%len(%trimr(cmd)));
on-error;
endmon;
endmon;
Code: Select all
url = 'jdbc:sqlserver://'
+ %trim(inSettings.server)
+ ':'
+ %trim(inSettings.port)
+';integratedSecurity=true;'
+';encrypt=true'
+';trustServerCertificate=true'
;
And ... I still have the error in log Unable to load authentication DLL mssql-jdbc_auth-12.8.1.x64 "
I would be grateful for your tips.
Please help me, what could I try to do, I have no more ideas.