java 8 - JTDS 1.3 connection issue with java8 x64 -
i following error when trying use jtds 1.3 + jdk1.8(64) on windows 7.
exception in thread "main" java.lang.runtimeexception: error initializing desengine @ net.sourceforge.jtds.util.desengine.init(desengine.java:76) @ net.sourceforge.jtds.util.desengine.<init>(desengine.java:51) @ net.sourceforge.jtds.jdbc.ntlmauth.answerlmchallenge(ntlmauth.java:52) @ net.sourceforge.jtds.jdbc.tdscore.sendntlmchallengeresponse(tdscore.java:2179) @ net.sourceforge.jtds.jdbc.tdscore.login(tdscore.java:613) @ net.sourceforge.jtds.jdbc.jtdsconnection.<init>(jtdsconnection.java:369) @ net.sourceforge.jtds.jdbc.driver.connect(driver.java:183) @ java.sql.drivermanager.getconnection(unknown source) @ java.sql.drivermanager.getconnection(unknown source) @ test4.test4.main(test4.java:15) caused by: java.security.nosuchalgorithmexception: des secretkeyfactory not available @ javax.crypto.secretkeyfactory.<init>(secretkeyfactory.java:122) @ javax.crypto.secretkeyfactory.getinstance(secretkeyfactory.java:160) @ net.sourceforge.jtds.util.desengine.init(desengine.java:69) ... 9 more
sample code here:
public static void main(string[] args) throws exception { string url = "jdbc:jtds:sqlserver://server:1433/db1;domain=dm1"; string user = "user"; string pwd = "password"; class.forname("net.sourceforge.jtds.jdbc.driver"); connection cn = drivermanager.getconnection(url, user, pwd); system.out.println("connected!"); }
java version:
c:\program files\java\jdk1.8.0_40\bin>java -version java version "1.8.0_40" java(tm) se runtime environment (build 1.8.0_40-b26) java hotspot(tm) 64-bit server vm (build 25.40-b25, mixed mode)
and here tests did:
jtds-1.3(1.3.1) windows7 + jdk1.7.79 (32) works windows7 + jdk1.7.79 (64) works windows7 + jdk1.8.40 (32) works windows7 + jdk1.8.40 (64) not working redhat6.6 + jdk1.7.79 (64) works redhat6.6 + jdk1.8.40 (64) works jtds-1.2.8: works on combination of system above.
any known issues regarding jtds1.3 + java8(64) on windows?
jtds 1.3.1 has known bug trying use ssl when making database connection, if run java 8. it's documented here: http://sourceforge.net/p/jtds/bugs/725/ while it's marked fixed, new release of code hasn't been packaged yet. use url flag ssl=request when connect jtds driver, way, if server supports ssl, we'll make ssl connection. when used java 8, got database connection failures, , bug ended being reason. can checkout code, , build driver (as ugly is) since has been on 1.5 years, , new release has yet released, fastest viable fix.
Comments
Post a Comment