0

Every time I try to make an API request with my application running on WebSphere, I get this in my logs when trying to log the error:

Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: https://cs28.salesforce.com/...
    at sun.reflect.GeneratedConstructorAccessor144.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:58)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:542)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1688)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1686)
    at java.security.AccessController.doPrivileged(AccessController.java:416)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1684)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1257)
    at com.ibm.net.ssl.www2.protocol.https.b.getInputStream(b.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
    at java.lang.reflect.Method.invoke(Method.java:620)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
    ... 28 more
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: https://cs28.salesforce.com/...
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1639)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
    at com.ibm.net.ssl.www2.protocol.https.b.getResponseCode(b.java:73)

I only get a 500 error when making the API request through websphere. Postman and other services make the request successfully, so I'm pretty stumped. Any thoughts?

  • show code about rest call. Maybe you need to but some data in the http header . – Mr_Thorynque Sep 12 '16 at 14:24
  • @Mr_Thorynque I'm just executing a simple post request that shouldn't require any headers according to the docs on the website. And I've also been able to successfully make the request using curl, postman, and a few other services. So I don't think that would be the issue? – Nicholas Siegmundt Sep 12 '16 at 14:32
  • 1
    what do the FFDC files say? – ArthurDM Sep 12 '16 at 14:35
  • One way to figure it out is to compare the HTTP Request Headers and Body sent from a working request (Postman) to those sent from the request that's failing (your Websphere app). You can use an http proxy like - https://www.charlesproxy.com/ - to capture your HTTP request and inspect it's headers and body text. – ab2000 Sep 12 '16 at 14:57
  • error will shown in FFDC – Phani Kumar Nov 30 '18 at 05:49

0 Answers0