Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.sql.SQLException: ORA-01017: invalid username/password; logon denied

790567Feb 23 2011 — edited Feb 23 2011
I’m getting following error only while hitting a oracle 11g db using jdbc.:-

Caused by: java.sql.SQLException: ORA-01017: invalid username/password; logon denied

at gov.va.med.term.access.readonly.factory.db.TableManagerFactory.select
_(TableManagerFactory.java:476)
at gov.va.med.term.access.readonly.factory.db.TableManagerFactory.select
Unique_(TableManagerFactory.java:520)
at gov.va.med.term.access.readonly.factory.db.TableManagerFactory.obtain
ByTableName(TableManagerFactory.java:730)
at example.gov.va.med.term.access.ValidateDB.<clinit>(ValidateDB.java:20
)
Caused by: java.sql.SQLException: ORA-01017: invalid username/password; logon de
nied

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.receiveOauth(T4CTTIoauthentica
te.java:791)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:362)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
439)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
n.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)


Do you have any idea what could be wrong here?

This is the tns entry:-
JOHN=
*(DESCRIPTION =*
*(ADDRESS = (PROTOCOL = TCP)(HOST = ISP-JOHN-LT.vha.med.va.gov)(PORT = 1521))*
*(CONNECT_DATA =*
*(SERVER = DEDICATED)*
*(SERVICE_NAME = john)*
*)*
*)*

Here’s the jdbc.properties:-
jdbc.url=jdbc:oracle:thin:@ISP-JOHN-LT.vha.med.va.gov:1521:JOHN
jdbc.driver=oracle.jdbc.driver.OracleDriver
user=admin
password=ADMIN-TEST1

I can connect to my db via sqlplus:-

C:\example> sqlplus admin/ADMIN-TEST1@john

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Feb 23 12:56:58 2011

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 23 2011
Added on Feb 23 2011
4 comments
16,947 views