|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] *** Error ***
This sort of question is better asked on the xen-api mailing list.
My apologies for misdirecting you here in private mail, it wasn't clear
which sort of "xen development" you were referring to in your mail.
Ian.
On Tue, 2010-08-03 at 15:48 +0100, Luis Carlos Moreira da Costa wrote:
>
> 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)
>
> */
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|