Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - what makes google weather api throw exception when request

what makes google weather api throw exception when request

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

what makes google weather api throw exception when request

Postby lemondev » Mon Mar 02, 2009 8:48 am

sample code here:
URL url = new URL("http://www.google.com/ig/api?hl=zh-CN&weather=Beijing"); // or "Beijing,China",zip code like "94043" and so on
URLConnection uc = url.openConnection();
uc.connect();
InputStream is = uc.getInputStream();

above line , it throws a NullPointerException .

i tried other parameters in the URL's construction ,sometimes it returns an InputStream object without any data (finally transfered to an empty string ) .
lemondev
Freshman
Freshman
 
Posts: 7
Joined: Thu Feb 12, 2009 3:32 pm

Top

Postby MrSnowflake » Mon Mar 02, 2009 10:00 am

I guess your connect doesn't really connect, so the iostreams are null.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby lemondev » Mon Mar 02, 2009 10:26 am

MrSnowflake wrote:I guess your connect doesn't really connect, so the iostreams are null.


how to check it ? do you mean the connection to "google.com" is failed to established

i tried another site and succeeded to download a rss file .
lemondev
Freshman
Freshman
 
Posts: 7
Joined: Thu Feb 12, 2009 3:32 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 6 guests