• 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

My cacerts keep expiring after 20 minutes?

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I am using the InstallCert.java file from http://nodsw.com/blog/leeland/2006/12/06-no-more-unable-find-valid-certification-path-requested-target to grab the certs from a SSL enabled server so i can connect via LDAP. The issue is that when i run the program, it generates the jssecacerts file just fine. I copy that to my JAVA_HOME security folder and I am able to connect great, everything works. Then after about 20 minutes it doesn't work anymore and i start getting this execption again



So if I re-copy the same exact cacerts file from before back into my security folder and it works...but again it seems to expire after a few minutes and I get the exceptions again. I am not changing or modifying anything that would cause it to not work. I am literally leaving the computer and coming back to find it no longer works and I need to reinstall.

I have tried adding this to my code to expllicity point to the certs file but i get a "the trustAnchors parameter must be non-empty]" exception which from what i have read means it cannot find the file


*NOTE that using the "javax.net.ssl.trustStore" doesn't work no matter when i try using it, i always get the same error.


what could be the problem?
 
Raymond Holguin
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While this isn't resolved, I realized I am using the Eclipse built-in JDK so maybe there is some refreshing or something happening that is invalidating the cacerts file. So I just switched to a JDK i have installed on my system to see if that fixes it somehow.

Had no effect, issue still persists...fml
 
Raymond Holguin
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok this topic can be closed. Turns out its a load balanced LDAP server so depending on when i ran my app i was getting different servers which i didn't have the certificates installed for. Stupid....
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had to laugh when I read that. (Sorry, don't mean to be cruel!) You just never know when something completely unexpected is going to come out and bite you, do you? Thanks for posting back with the resolution.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic