Io exception: Unknown Encryption or Data Integrity algorithm
650223Jul 15 2008 — edited Aug 27 2008Help! I'm not a java programmer but have been given someone else's code to maintain. Now, the database I need to connect to requires encryption. I'm having trouble connecting & have lots of questions. Please send help!
Here is what plagues me:
1. I'm using the jdbc thin client $CLASSPATH = /usr/java/jdk1.6.0/lib/tools.jar:.:/usr/java/jdbc/oracle/ojdbc14.jar
do I need to un-jar the jar?
2. Here is the errors I get:
Io exception: Unknown Encryption or Data Integrity algorithm
ConnectionBean: driver not loaded
null
Here is my code:
import java.sql.*;
import java.util.*;
import java.text.*;
import java.io.*;
import oracle.net.ns.*;
import oracle.net.ano.*;
import oracle.jdbc.*;
import oracle.jdbc.pool.*;
.
.
. MISC CODE & LOGIC / COMPLICATED QUERIES
.
.
.
.
private Connection getConnection(String iaUserID,String iaPWD) {
Connection cn = null;
String username = iaUserID;
String password = iaPWD;
String driver="oracle.jdbc.driver.OracleDriver";
String dbURL="jdbc:oracle:thin:" + username +"/" + password + "@192.168.111.2:1521:iapr";
Properties prop = new Properties();
prop.put("oracle.net.encryption_client", "REQUIRED");
prop.put("oracle.net.encryption_types_client", "( AES128 )");
prop.put("oracle.net.crypto_checksum_client", "REQUESTED");
prop.put("oracle.net.crypto_checksum_types_client", "( MD5 )");
try {
Class.forName(driver);
cn = DriverManager.getConnection(dbURL, prop);
}
catch(ClassNotFoundException e) {
e.printStackTrace();
System.err.println("ConnectionBean: driver unavailable");
cn = null;
}
catch(SQLException e) {
System.err.println(e.getMessage());
System.err.println("ConnectionBean: driver not loaded");
cn = null;
}
return cn;
}
}
I'm kind of a n00b so the more detailed you can be with any questions, the better! Thanks for all your help in advance.
Total-n00b