This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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().
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.
Joined: May 17, 2004
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).