Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364968

Summary: Unable to open an InputStream when running on Virgo
Product: [RT] Virgo Reporter: Chris Frost <eclipse>
Component: runtimeAssignee: Project Inbox <virgo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: glyn.normington
Version: 3.0.1.RELEASE   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
source for the failing bundle. none

Description Chris Frost CLA 2011-11-28 10:44:39 EST
Created attachment 207608 [details]
source for the failing bundle.

Opened on behalf of Durga Tirunagari.

Hi Chris,

   Sorry I was on vacation for the past week.

   Please find attached bundle as well as the java (stand-alone project).

    private static final String GOOGLE_SERVICE =
            "http://maps.googleapis.com/maps/api/elevation/json?locations=";

_Durga

Hi Chris,

  Thanks for the prompt reponse.

   Please find my responses in line.

As far as getting your application to communicate with an external API, I'm guessing it's something like a RESTfull http end point, it's just like any other application running on Tomcat. 

    Absolutely yes, we are talking to a Google Elevation API, to retrieve the Elevation of a particular place. 

    I have a standalone java program that connects to Google Elevation API and get's the elevation, this works fine.
    Now I am trying to use the same code in one of the java services deployed in Virgo.


Virgo doesn't affect things this far up the stack. When you say it is timing out, what exactly is. The connection to Google or one of the bundles in your application starting up itself?

    The bundles start just fine, the time out is in the connection to the Google Elevation API. 

    Debug logs show Connection Time out while getting InputStream. BTW, here is a code snippet, I removed all the try / catch blocks and just show the main parts of the code.

    // Create an URL object with the URL to the Google Elevation API.
          URL source =  new URL(GOOGLE_SERVICE);
          URLConnection urlConnection = source.openConnection();

          InputStreamReader streamReader = new InputStreamReader(connection.getInputStream());

          The above call time's out ( Connection Time Out )


 Thanks a bunch for your help!!!.
-Durga Tirunagari

Hi Chris,

    We're trying to write an application, that talks to a Google Elevation API. But the application always time's out. Is there a setting or option in Virgo Web Server we need to make to enable this application that is deployed on Virgo web Server to talk to the Google Elevation API ?

 Thanks much!!!
_Durga
Comment 1 Glyn Normington CLA 2011-12-02 05:40:00 EST
We are following up with Durga about HTTP proxy settings.
Comment 2 Glyn Normington CLA 2011-12-09 04:42:34 EST
The solution was to set -Dhttp.proxyHost and -Dhttp.proxyPort as VM arguments under Eclipse or in JAVA_OPTS when launching via the startup script.