I need t connect to oracle db 8.17
but on line :
Connection connection2 = DriverManager.getConnection(("jdbc
racle:thin:@localhost:1521
rcl"), "system", "manager");
i receive receive exception :sqlexception :
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
may be there is another appropoach to connect or where is my error?
public Benchmark() {
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
Connection connection1 = DriverManager.getConnection("jdbc:mysql://localhost/bidnow?user=root&password=root");
Connection connection2 = DriverManager.getConnection("jdbc
racle://localhost/first:1521?user=system&password=manager");
long time1 = doInsert(connection1, 10);
long time2 = doInsert(connection2, 10);
} catch (Exception exception) {
exception.printStackTrace();
}
}