Why do I receive a Java exception while using Datafeed Toolbox to retrieve data from Yahoo when I specify an IP address in the connection?
7 views (last 30 days)
Show older comments
Using the Datafeed Toolbox, I connect to Yahoo and attempt to retrieve data using:
c = yahoo('<http://quote.yahoo.com','192.168.3.15',8080>);
d = fetch(c,'msft','05/01/04','05/31/04')
I receive the following Java exception:
??? Java exception occurred:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at ice.net.ConnectionManager.createSocket(OEAB)
at ice.net.ConnectionManager.getConnection(OEAB)
at ice.net.HttpURLConnection.connect(OEAB)
at ice.net.HttpURLConnection.getInputStream(OEAB)
at java.net.URL.openStream(Unknown Source).
Error in ==> yahoo.fetch>wwwread at 293
is = www.openStream;
Error in ==> yahoo.fetch at 243
[tmpdat,h] = wwwread(fetchurl,numinputs,c);
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
This bug has been fixed for Release 14 SP1 (R14SP1). For previous releases, please read below for any possible workarounds:
This is a bug in the way that the FETCH function for the Yahoo datafeed in the way the Datafeed Toolbox 1.5 (R14) constructs the URL when an IP address is specified for the connection.
Some customers have found that commenting out lines 288-290 and line 292 of the following file:
$MATLAB\toolbox\datafeed\datafeed\@yahoo\fetch.m
where $MATLAB is your MATLAB root directory, resolves this issue.
0 Comments
More Answers (0)
See Also
Categories
Find more on Web Services in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!