• 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

Apache VFS - 'force' it not to use SSL

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to get data from the http://openexchangerates.org API using Apache Commons VFS. I am getting errors that imply that it is trying to use SSL validation - not something I have available via my plan with the website. Anyone know any way that I can 'force' VFS to use http rather than https?

The pertinent points of the huge stack trace are included below - more info can be provided if required:

Been bashing my head against a wall for a while over this - if anyone has any ideas, I'd be really grateful!
 
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
Sorry, I don't know how to persuade Apache Commons VFS to not use HTTPS, but on the other hand why are you even using that if you just want to submit an HTTP request and receive the response from that site? Seems to me that Apache HttpClient would be more appropriate.

And welcome to the Ranch!
 
Seren Thia
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:...but on the other hand why are you even using that if you just want to submit an HTTP request and receive the response from that site? Seems to me that Apache HttpClient would be more appropriate.



Mm, this is fair - it's a legacy tool used for a different purpose that we hoped to reappropriate. Perhaps we'll just use something simpler instead :-)

Thanks for the response
 
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The actual error means you have not put valid certificates into your truststore.

The problem is not with the tool, IMHO, the problem is with the developer not understanding the basic concepts about PKIX path building, which is essential if you want to use SSL.

You should be using this form of the call, which you can turn SSL off if you do not want to use it, by invoking FtpFileSystemConfigBuilder rather than SftpFileSystemConfigBuilder



Then again, if your wanting to perform RESTful calls exclusively, your better interface would be Jersey rather than VFS.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic