stripe/stripe-scala — Issue #3: Pluggable HttpClient (AppEngine compatibility)
Author: ben-manes
Created: 2012-02-08 12:28:59+00:00
State: open

I think that the current usage of Apache HttpClient is not compatible with Google AppEngine, resulting in the error below. Details of how to make client compatible is described at:
http://code.google.com/p/googleappengine/wiki/WillItPlayInJava

The cleanest approach may be to use the cake pattern to allow changing the default http client. Another approach may be to define a provider, defaulting to the current implementation, that can set. Either would allow the client to swap out the client and provide one configured to work in their environment.

java.lang.NoClassDefFoundError: Could not initialize class com.google.apphosting.runtime.security.shared.stub.javax.net.ssl.KeyManagerFactory
at org.apache.http.conn.ssl.SSLSocketFactory.createSSLContext(SSLSocketFactory.java:221)
at org.apache.http.conn.ssl.SSLSocketFactory.createDefaultSSLContext(SSLSocketFactory.java:359)
at org.apache.http.conn.ssl.SSLSocketFactory.getSocketFactory(SSLSocketFactory.java:173)
at org.apache.http.impl.conn.SchemeRegistryFactory.createDefault(SchemeRegistryFactory.java:49)
at org.apache.http.impl.client.AbstractHttpClient.createClientConnectionManager(AbstractHttpClient.java:305)
at org.apache.http.impl.client.AbstractHttpClient.getConnectionManager(AbstractHttpClient.java:467)
at com.stripe.APIResource.rawRequest(Stripe.scala:120)
at com.stripe.APIResource.request(Stripe.scala:125)
at com.stripe.Customer$.create(Stripe.scala:242)