Skip to Main Content

SQL & PL/SQL

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!

jdbc:oracle:thin giving mystery error

sanFeb 17 2015 — edited Feb 25 2015

Hi All ,

I am using Oracle 11 G and i have a java clause which is used to connect the another DB and pull the data. Below is My JDBC Syntax

 

public static void query(String usr, String pssw, String hostname, String port, String DB, String InitialDate) throws Exception
  {
    Class.forName("oracle.jdbc.OracleDriver");     
        String url = "jdbc:oracle:thin:@//" + hostname + ":" + port +"/" + DB; 
    Connection connIW = DriverManager.getConnection(url, usr,pssw);
   try  {
      Statement stmt = connIW.createStatement();

Now i am getting 

ORA-29532:
Java call terminated by uncaught Java exception: java.sql.SQLException:
ORA-01017: invalid username/password; logon denied

But i can able to connetc with Sql developer using the same user name , Password , HOST , port and DB Service name .

Could some one help me to resolve the issue.

Regards,

San.

This post has been answered by san on Feb 25 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 25 2015
Added on Feb 17 2015
18 comments
7,235 views