• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error code of ORA-12645 for DB connection

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,


 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
You've gotta fight it! Don't give in! Read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic