From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luis Carlos Moreira da Costa Subject: *** Error *** Date: Tue, 03 Aug 2010 11:48:12 -0300 Message-ID: <4C582C2C.7080407@alog.com.br> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0361325326==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============0361325326== Content-Type: multipart/alternative; boundary="------------020007030604080004080405" This is a multi-part message in MIME format. --------------020007030604080004080405 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Could someone help me, goatees to know why this error happens? Regards, LuisCM ========================================================= package com.alog.xenapi.luis; import java.net.URL; import com.xensource.xenapi.APIVersion; import com.xensource.xenapi.Connection; import com.xensource.xenapi.Session; public final class TCon { private final static String HOSTNAME = "http://187.33.17.4:9363"; private final static String USERNAME = "root"; private final static String PASSWORD = "xyz#!232"; protected static Connection connection; private static String connectionName; protected static void connect() throws Exception { connection = new Connection( new URL( HOSTNAME ) ); System.out.println( String.format( "logging in to '%s' as '%s' with password '%s'...", HOSTNAME, USERNAME, PASSWORD ) ); System.out.println( "connection.getSessionReference() " + connection.getSessionReference() ); Session.loginWithPassword( connection, USERNAME, PASSWORD, APIVersion.latest().toString() ); System.out.println( "Success" ); connectionName = HOSTNAME; } protected static void disconnect() throws Exception { System.out.println( "disposing connection for " + connectionName ); Session.logout( connection ); } public static void main( final String[] args ) throws Exception { TCon.connect(); TCon.disconnect(); } } /** logging in to 'http://187.33.17.4:9363' as 'root' with password 'xyz#!232'... connection.getSessionReference() null Exception in thread "main" You tried to call a method with the incorrect number of parameters. The fully-qualified method name that you used, and the number of received and expected parameters are returned. at com.xensource.xenapi.Types.checkResponse(Types.java:1291) at com.xensource.xenapi.Connection.dispatch(Connection.java:367) at com.xensource.xenapi.Session.loginWithPassword(Session.java:490) at com.alog.xenapi.luis.TCon.connect(TCon.java:22) at com.alog.xenapi.luis.TCon.main(TCon.java:33) */ --------------020007030604080004080405 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
Could someone help me, goatees to know why this error happens?

Regards,
LuisCM

=========================================================

package com.alog.xenapi.luis;

import java.net.URL;

import com.xensource.xenapi.APIVersion;
import com.xensource.xenapi.Connection;
import com.xensource.xenapi.Session;

public final class TCon {

    private final static String HOSTNAME = "http://187.33.17.4:9363";
    private final static String USERNAME = "root";
    private final static String PASSWORD = "xyz#!232";
  
    protected static Connection connection;
    private static String connectionName;
  
    protected static void connect() throws Exception {
        connection = new Connection( new URL( HOSTNAME ) );
        System.out.println( String.format( "logging in to '%s' as '%s' with password '%s'...", HOSTNAME, USERNAME, PASSWORD ) );
        System.out.println( "connection.getSessionReference() " + connection.getSessionReference() );
        Session.loginWithPassword( connection, USERNAME, PASSWORD, APIVersion.latest().toString() );
        System.out.println( "Success" );
        connectionName = HOSTNAME;
    }

    protected static void disconnect() throws Exception {
        System.out.println( "disposing connection for " + connectionName );
        Session.logout( connection );
    }

    public static void main( final String[] args ) throws Exception {
        TCon.connect();
        TCon.disconnect();
    }
  
}

/**

logging in to 'http://187.33.17.4:9363' as 'root' with password 'xyz#!232'...
connection.getSessionReference() null
Exception in thread "main" You tried to call a method with the incorrect number of parameters.  The fully-qualified method name that you used, and the number of received and expected parameters are returned.
    at com.xensource.xenapi.Types.checkResponse(Types.java:1291)
    at com.xensource.xenapi.Connection.dispatch(Connection.java:367)
    at com.xensource.xenapi.Session.loginWithPassword(Session.java:490)
    at com.alog.xenapi.luis.TCon.connect(TCon.java:22)
    at com.alog.xenapi.luis.TCon.main(TCon.java:33)

*/


--------------020007030604080004080405-- --===============0361325326== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0361325326==--