Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lyo » Connection Timeout error while running StockQuotes sample
Connection Timeout error while running StockQuotes sample [message #1219822] Thu, 05 December 2013 20:26 Go to next message
Shinji Kanai is currently offline Shinji Kanai
Messages: 3
Registered: December 2013
Junior Member
Hello,

Accessing the URL (http://<host>/OSLC4JStockQuote/stockQuotes) results into Http Error 500 due to Connection Timeout. It looks like the problem was caused because Google API to retrieve finance data (line 211 in StockQuoteResource.java) is no longer valid. Does anyone come across the same problem? Can you suggest how to solve it?

Thank you in advance.

--Shinji
Re: Connection Timeout error while running StockQuotes sample [message #1220272 is a reply to message #1219822] Tue, 10 December 2013 13:33 Go to previous messageGo to next message
Samuel Padgett is currently offline Samuel Padgett
Messages: 14
Registered: July 2009
Junior Member
I'm not able to reproduce the error. Are you still seeing the problem? You might also try hitting the service directly to test your connectivity:

http://www.google.com/finance/info?infotype=infoquoteall&q=IBM,Goog

For me this returns stock data in JSON.
Re: Connection Timeout error while running StockQuotes sample [message #1220305 is a reply to message #1220272] Tue, 10 December 2013 19:54 Go to previous messageGo to next message
Shinji Kanai is currently offline Shinji Kanai
Messages: 3
Registered: December 2013
Junior Member
Hello,

Thanks for your reply, but I am still experiencing the issue. The original "uri" string I found is "www.google.com/finance/info?infotype=infoquoteall&q=". Does this uri return anything to you? The link provided by you works for me as well, but the original link returns "nothing" (blank page). Don't you think the original string needs to be updated accordingly?

Best Regards,

--Shinji
Re: Connection Timeout error while running StockQuotes sample [message #1220400 is a reply to message #1220305] Wed, 11 December 2013 09:06 Go to previous messageGo to next message
Samuel Padgett is currently offline Samuel Padgett
Messages: 14
Registered: July 2009
Junior Member
The original string is just the base URL for the service. You need to add a stock symbol after the "q=", which happens later in the code.
Re: Connection Timeout error while running StockQuotes sample [message #1220468 is a reply to message #1220400] Wed, 11 December 2013 19:54 Go to previous message
Shinji Kanai is currently offline Shinji Kanai
Messages: 3
Registered: December 2013
Junior Member
Hi,

Thanks for your assist, your response gave me a hint.
I could resolve the issue by setting "proxy" explicitly in the code:

e.g.
final ClientConfig clientConfig = new ClientConfig();
clientConfig.proxyHost("hostname");
clientConfig.proxyPort(<port>);

Thank you!
Previous Topic:Recommended url paths? Bugzilla example ..?
Next Topic:SecureHelloWorld - consumerStore is null
Goto Forum:
  


Current Time: Tue Jul 22 17:44:14 EDT 2014

Powered by FUDForum. Page generated in 0.01528 seconds