Home » Developer & Programmer » JDeveloper, Java & XML » jdbc, Thin ==> ORA-01017: invalid username/password; logon denied
jdbc, Thin ==> ORA-01017: invalid username/password; logon denied [message #159829] Tue, 21 February 2006 18:13
mm1122
Messages: 1
Registered: February 2006
Junior Member
Hi,
can anyone help me by the following problem?

I've installed Oracle Database Express Edition 10g Release 2 (10.2) - Beta on Win2k sp4.
I can access with sqlplus:
sqlplus ANONYMOUS/anonymous@//localhost:1521/XE AS SYSDBA
sqlplus HR/tiger@//localhost:1521/XE AS SYSDBA

But if i try to access in Java, jdk (build 1.4.2_10-b03) with:

import java.sql.*;
import java.util.Properties;

class TestOracle1 {
//set xsql_bin = C:\db\oraclexe\app\oracle\product\10.2.0\server\BIN
//set classpath = %xsql_bin%\..\jdbc\lib\ojdbc14.jar;%classpath%
//set classpath = %xsql_bin%\..\jlib\orai18n.jar;%classpath%
public static void main (String [] args)
throws ClassNotFoundException, SQLException {

Class.forName ("oracle.jdbc.driver.OracleDriver");

Properties prop = new Properties ();
prop.put ("internal_logon", "sysdba");

Connection con = DriverManager.getConnection (
"jdbc:oracle:thin:hr/tiger@//localhost:1521/XE",
// "jdbc:oracle:thin:ANONYMOUS/anonymous@//localhost:1521/XE",
prop);

con.close ();
}
}

i become:

Exception in thread "main" java.sql.SQLException:
ORA-01017: invalid username/password; logon denied

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:288)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:357)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)

at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at TestOracle1.main(TestOracle1.java:22)


Thanks a for any help
Previous Topic: Loading very LARGE xml file into oracle database relational table
Next Topic: XMLParser hanging
Goto Forum:
  


Current Time: Sun Dec 17 09:03:50 CST 2017

Total time taken to generate the page: 0.14631 seconds