Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error code of ORA-12645 for DB connection

 
Steve Jiang
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I met the exeception ORA-12645 in java code, when I tried to check the error code when exeception happened, I got the error code 17002, is th execption 17002 wrapped the ORA-12645 execption? should we check the exception error code as 17002? as I don't get 12645 from e.getErrorCode().

Thanks,


 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably not two Exceptions wrapped in each other, but additional information in the SQLException.
You know most Exceptions have a "message" field? Well, SQLExceptions have two additional fields, code and SQL state. One if a String, and the other is an int. You can print them out quite simply with their get methods. You will have to look in the vendor's documentation to find out what the code and state mean.

Probably not a good idea to write code to catch a single error state; you need to find out what it means and check whether there is anything in your code which ought to be corrected.
 
Steve Jiang
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the SQLcode for the exception is null and the message for exception is " Io exception: Oracle Error ORA-12645" , also the getNextException() is null.

but I am not sure what is the relation between error code 17002 and Execption message ORA-12645. My first impression for the error code for ORA-12645 should be 12645 , but from the code , it prints out 17002.

I hope to understand if 17002 is correct error code which check for this execption, (not include more or less exception than the real issues).

Thanks,
 
Paul Campbell
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ORA-12645 Parameter does not exist

Cause:A sqlnet.ora parameter from which a value was needed does not exist.
Action:Set the parameter in the parameter file.

This is usually a problem with the encryption value in the client not matching what is expected on the database. Which client driver version are using? What version is your Oracle data base.

The ORA-17002 is an IOException. This is being caused by the ORA-12645 error.
 
Steve Jiang
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I have found the issue for ORA-12645 and will remove the encryption to fix the ORA-12645 exception.

I hope to check if I should use e.getErrorCode(0 == 17002 for teh condition to apply the change, since I hope to confirm the fix is applied only for ORA-12645.

I print out the error code for that execption and it is 17002, but I can't explain why the error code I got is 17002 , but not 12645 , or if there is any relation between that?
 
Paul Campbell
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have you tried running your SQL directly against the database (i.e., SQLPlus). What does it return?
 
Steve Jiang
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error is happened when trying to connect DB and before running the SQL. From sql plus, it shows ora-12645 error when trying to connect DB.
[ October 21, 2008: Message edited by: Steve Jiang ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic