Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Does JDBC Use Certs or CA's ?

 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am coding a java class to connect to a remote database via jdbc. The code is pretty straightforward:







If I change the jdbc URL to a different database, I am able to connect to it and query it. If I try to connect to the real database I am getting the following error:






This is really killing me. Does anyone know how / if / why jdbc uses CA's or certs?
 
author & internet detective
Posts: 40797
828
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

James Ellis wrote:This is really killing me. Does anyone know how / if / why jdbc uses CA's or certs?


It's a remote database. You don't want just anybody to connect and get all the data. Certs seem like a valid way to protect against someone knowing the password.

I don't know the answer to your actual question. Maybe check with whomever gave you the cert?
 
James Ellis
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually nobody gave me a cert...in fact I didn't think that certs were even in the equation in JDBC until I saw that stack trace. All I did was type in a standard jdbc URL for a thin driver (nothing funky in it) and connecting to this one particular DB always gives me this stack trace that includes a message about certificates. That's why I was asking, how/when/why are certificates used in JDBC or is this just stack trace about certs just a red herring?
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its not JDBC that is doing this it is Oracle. Speak to your DBA.
 
James Ellis
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paul,

Do you have any specific advice I can pass on to the DBA such as "please turn off XYZ service which is preventing remote JDBC connections"? Otherwise, I think the DBA group is going to tell my code is the problem.

Thanks,
Jim
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read the documentation for your Oracle JDBC driver - it should tell you how to configure the connection to use a certificate. You will also need to get the key from your DBA.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic