java.security.KeyStoreException when trying to create HTTP instance

I guess it is picking up JVM system properties setup for the container or something like that.

Try manually providing a HttpConnectionContext, you should be able to use HttpConnectionContext.noEncryption()