XML-RPC - java.lang.ClassCastException: java.util.Date error during execute

Discussion in 'Java' started by mgalaty, Sep 10, 2004.

  1. mgalaty

    mgalaty Guest


    I am getting an error "XML-RPC - java.lang.ClassCastException:
    java.util.Date" when I call the "XmlRpcClient" execute method. I
    believe the underlying classes are having trouble parsing the result
    from the time.xmlrpc.com/RPC2:80 XML-RPC service.

    I apologize that I could not navigate the Apache bug reporting and
    search system. I hope someone can recognize what is up with this.

    Thank you in advance for any help,


    import java.util.Vector;
    import java.util.Hashtable;
    import org.apache.xmlrpc.*;

    public class GetTime {
    private final static String server_url
    public static void main (String [] args) {
    try {

    XmlRpcClient server = new XmlRpcClient(server_url);
    Vector params = new Vector();

    System.out.println("Calling execute method ");
    Hashtable response = new Hashtable();
    response = (Hashtable)
    System.out.println("Time is: ");

    } catch (XmlRpcException exception) {
    System.err.println("GetTime1: XML-RPC Fault #" +
    Integer.toString(exception.code) + ": " + exception.toString());

    } catch (Exception exception) {
    System.err.println("GetTime2: " + exception.toString());

    Note: This is similar to this post, but NOT the same.
    mgalaty, Sep 10, 2004
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page