Question about Java Programming

13 views
Skip to first unread message

Casper

unread,
Sep 1, 2011, 11:39:14 AM9/1/11
to build-kiva
Hi,

I have problem accessing the lenders XML file with a Java program. It
was working until recently.
The weird part of the problem is that my partner was able to run it
smoothly on his Macbook (OS Leopard).

A shortened version of the code is as followed:

import java.net.*;
import java.io.*;

public class testing {
public static void main(String[] args) throws Exception {
URL oracle = new URL("http://api.kivaws.org/v1/lenders/
michael.xml");
URLConnection yc = oracle.openConnection();
System.out.println(yc.getURL());
BufferedReader in = new BufferedReader(
new InputStreamReader(
yc.getInputStream()));
String inputLine;

while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}


The error is as followed:
Exception in thread "main" java.io.IOException: Server returned HTTP
response code: 500 for URL: http://api.kivaws.org/v1/lenders/michael.xml


I tried to google for a solution and it seems that the error is due to
kiva's server. Please advise

Thanks

Noah Balmer

unread,
Sep 14, 2011, 4:43:10 PM9/14/11
to build...@googlegroups.com
A 500 error is a server error, but I can't reproduce the problem.  It's possible you were trying this while we were in the middle of an update or something.  Let me know if it happens again.

-Noah


--
You received this message because you are subscribed to the Google Groups "build-kiva" group.
To post to this group, send email to build...@googlegroups.com.
To unsubscribe from this group, send email to build-kiva+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/build-kiva?hl=en.


Reply all
Reply to author
Forward
0 new messages