I should have mentioned this is specific to the App Engine *standard 
*environment 
- there aren't any sandbox restrictions on the flexible environment, so 
migrating 
<https://cloud.google.com/appengine/docs/flexible/go/migrating#url_fetch> 
to that is an option. 

On Wednesday, February 15, 2017 at 2:11:33 AM UTC-5, Shachar Grembek wrote:
>
> Thanks, but apparently it is used by a library that I using and therefore 
> it makes things more complicated. Is there a workaround in matters of the 
> technology stack that I am using that I can change so that the current 
> implementation of that library wouldn't be an issue with the other stack. 
> For example moving from Servlet based API to Google Endpoints or moving 
> from App Engine to VM or Container?
> BTW: I tried to edit the library code and update their usage
>
> On Wednesday, February 15, 2017 at 12:49:56 AM UTC+2, Adam (Cloud Platform 
> Support) wrote:
>>
>> URLFetchServiceStreamHandler extends HttpURLConnection, not 
>> HttpsURLConnection. You can use HttpURLConnection to connect to https:// 
>> URLs though. 
>>
>> The issue is that zendesk-java-client relies on Ning's AsyncHttpClient 
>> 1.9.x which is doing things like this 
>> <https://github.com/AsyncHttpClient/async-http-client/blob/1.9.x/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java#L184>
>> :
>>
>>       if (request.getUri().getScheme().equals("https")) {
>>             HttpsURLConnection secure = (HttpsURLConnection) 
>> urlConnection;
>>
>> It would not work on App Engine without some modifications to the source 
>> code to avoid casting HttpURLConnection to HttpsURLConnection. Not all 
>> libraries will work on App Engine out of the box due to some quirks such as 
>> these
>>
>> On Tuesday, February 14, 2017 at 4:03:28 PM UTC-5, Shachar Grembek wrote:
>>>
>>> Hi,
>>>
>>>
>>> I am using the Zendesk java client (
>>> https://github.com/cloudbees/zendesk-java-client) on my Google App 
>>> Engine server and I have a runtime issue that prevents me from using the 
>>> SDK. Can you please advise:
>>>
>>> When I call the Zendesk SDK, I get on the server:
>>>
>>>
>>> I am using JDK 7 with App Engine SDK 1.9.49
>>>
>>>
>>> Uncaught exception from servlet java.lang.ClassCastException: com.google
>>> .apphosting.utils.security.urlfetch.
>>> URLFetchServiceStreamHandler$Connection cannot be cast to javax.net.ssl.
>>> HttpsURLConnection 
>>> at com.ning.http.client.providers.jdk.JDKAsyncHttpProvider.
>>> createUrlConnection(JDKAsyncHttpProvider.java:184)
>>> at com.ning.http.client.providers.jdk.JDKAsyncHttpProvider.execute(
>>> JDKAsyncHttpProvider.java:147)
>>> at com.ning.http.client.providers.jdk.JDKAsyncHttpProvider.execute(
>>> JDKAsyncHttpProvider.java:118)
>>> at com.ning.http.client.AsyncHttpClient.executeRequest(AsyncHttpClient.
>>> java:506) 
>>> at org.zendesk.client.v2.Zendesk.submit(Zendesk.java:1751) 
>>> at org.zendesk.client.v2.Zendesk.access$1300(Zendesk.java:90)
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/f873cf52-948c-42fc-8849-f58e4591c1d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to