• 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

Errors when using HttpsURLConnection

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this is just an easy configuration issue, but so far I've had no luck searching...

Java 1.6 x64
Eclipse Helios x64
Tomcat 6.0.26
Windows 7 Ult x64 and Mac OS X

I'm building an app that executes facebook graph requests (which are required to go over https). The code that I have works on my OS X box, but not on my Win7 machines. I have JAVA_HOME pointed to the jdk install directory (not the JRE inside of that).

At first, I was getting the following exception:


After adding the following to one of my loaded .properties files, the situation improved slightly:


Now I'm getting the following:



Of course the JCE and JSSE jars are in the JAVA_HOME/jre/lib dir, and Eclipse has them listed with my selected JRE.

So my first obvious question is, how do I fix this and what am I missing here?

Second, what's different between the default installations/configurations of the above software on these two different OS's?

Thanks in advance for any help.
 
Kurt Kopf
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Attempted to switch to BouncyCastle JCE implementation by doing the following:


and now getting the error:


Not sure if that helps, but I'm focusing on getting BouncyCastle to work instead at the moment.
 
Kurt Kopf
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually think I got the BouncyCastle provider working... looks like my java.home property was set incorrectly (set to <jdk>/jre/lib when it should have been <jdk>/jre).

I'm still trying to figure out the original issue with the default JCE.
 
Kurt Kopf
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After further testing, it also appears that fixing my "java.home" path in my properties file fixed the default JCE implementation as well.

Hopefully this helps someone else out there
 
Ranch Hand
Posts: 64
Netbeans IDE Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I experienced "the trustAnchors parameter must be non-empty" today using OpenJDK 6 on Debian 5.0. The "java-6-sun" package ran just fine, but the "java-6-openjdk" package java failed. The OpenJDK default trustStore jre/lib/security/cacerts file is missing [0]. I just switched to using java-6-sun instead of fixing the cacerts file for OpenJDK.

[0] http://download.oracle.com/javase/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#X509TrustManager
 
Acetylsalicylic acid is aspirin. This could be handy too:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic