Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

I have experienced this problem a lot in development and testing scenarios where you want to use an external third party data provider service. Simple solution is to use the SimpleProxyServlet configuration as given in SAP help portals.

But this worked well for me when I was on direct internet connection. There is no firewall or a corporate proxy in between. For networks which are behind a proxy you are probably getting an internal server error with tomcat response code 500.

Below would be your exception trail in response headers.


java.net.UnknownHostException: services.odata.org
        java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        java.net.PlainSocketImpl.connect(Unknown Source)
        java.net.SocksSocketImpl.connect(Unknown Source)
        java.net.Socket.connect(Unknown Source)
        java.net.Socket.connect(Unknown Source)
        sun.net.NetworkClient.doConnect(Unknown Source)
        sun.net.www.http.HttpClient.openServer(Unknown Source)
        sun.net.www.http.HttpClient.openServer(Unknown Source)
        sun.net.www.http.HttpClient.<init>(Unknown Source)
        sun.net.www.http.HttpClient.New(Unknown Source)
        sun.net.www.http.HttpClient.New(Unknown Source)
        sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
        sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
        sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
        sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
        com.sap.ui5.proxy.SimpleProxyServlet.service(SimpleProxyServlet.java:216)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

I searched a lot to find a solution to this constant headache. Then I found that it’s not a problem with proxy servlet or tomcat. This is because your JRE is not able to fetch system proxy and not able to connect to external system.

Mostly we would be using eclipse for UI5 developments. So to make your JRE proxy enabled you have to provide some VM arguments.

To configure these in your eclipse installation go to Window-> Preferences in filter box type installed JRE.

Select a JRE version click Edit and enter the below arguments in Default VM Arguments.


-DproxyHost=<proxyserver.com>


-DproxyPort=<proxyport>


-DproxyUser=<proxyUser>


-DproxyPassword=<proxyPassword>


-Dhttp.nonProxyHosts=<domain>|*<generic exception domain>


Apply these settings and restart your tomcat server from servers View.

Now even if you are behind a proxy server then JRE will know to use a proxy server.