aspose file tools*
The moose likes JDBC and the fly likes Error code of ORA-12645 for DB connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Error code of ORA-12645 for DB connection" Watch "Error code of ORA-12645 for DB connection" New topic
Author

Error code of ORA-12645 for DB connection

Steve Jiang
Ranch Hand

Joined: May 17, 2004
Posts: 106
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

Joined: Oct 13, 2005
Posts: 36508
    
  16
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

Joined: May 17, 2004
Posts: 106
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

Joined: Oct 06, 2007
Posts: 338
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

Joined: May 17, 2004
Posts: 106
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

Joined: Oct 06, 2007
Posts: 338
have you tried running your SQL directly against the database (i.e., SQLPlus). What does it return?
Steve Jiang
Ranch Hand

Joined: May 17, 2004
Posts: 106
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error code of ORA-12645 for DB connection
 
Similar Threads
Index Error (Oracle)
JDBC tries multiple times to connect on a bad login
Getting error like " Listener refused the connection with the following error: ORA-12514, ..."
New to JDBC - problems
Exception in thread "main" java.lang.NoClassDefFoundError: