Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Weather App in Need of Tests

Hugo Hayes
PLUS
Hugo Hayes
Courses Plus Student 13,146 Points

The app returns a 500 error

When I attempt a location search on the weather app , It returns the following message.

HTTP Status 500 - Request processing failed; nested exception is org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://maps.googleapis.com/maps/api/geocode/json?address=Chicago&sensor=false&key=AIzaSyDwWmtflOJ9VPNFFnALlNxvB41oA5fbt70": Connect to maps.googleapis.com:443 [maps.googleapis.com/216.58.200.234, maps.googleapis.com/172.217.24.10, maps.googleapis.com/172.217.27.138, maps.googleapis.com/216.58.200.42] failed: connect timed out; nested exception is org.apache.http.conn.ConnectTimeoutException: Connect to maps.googleapis.com:443 [maps.googleapis.com/216.58.200.234, maps.googleapis.com/172.217.24.10, maps.googleapis.com/172.217.27.138, maps.googleapis.com/216.58.200.42] failed: connect timed out

I've provided my my API keys to the 3rd Party API requests. Can someone please take a look at this problem?

1 Answer

Diego Garcia Lozano
Diego Garcia Lozano
12,503 Points

Hi, I might be a probably late, but I faced the same problem right know and I think I managed to solve it by editing the value of geocode.api.region value in the api.propierties file. In the video, the code is US, but since I am from Argentina I used AR and it started to work. Not a 100% sure that that is your problem, but you can give it a try.

# Google Geocoding API
geocode.api.name = Google Geocode API
geocode.api.key = YOUR_KEY
geocode.api.host = maps.googleapis.com
geocode.api.region = AR