|
|
|
|
|
|
|
|
|
|
xen-api
[Xen-API] Error:org.apache.xmlrpc.XmlRpcException
Dear XEN-API users
I am new to JAVA XEN-API. when iam execute the sample Test.java given
in java-binding-source. iam getting the following errors. Iam not able
to trace out the error.
org.apache.xmlrpc.XmlRpcException: method "VM.get_all_records" is not supported
at
org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:181)
at
org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:149)
at
org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:95)
at
org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:39)
at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
at com.xensource.xenapi.ConnectionHelper.dispatch(ConnectionHelper.java:97)
at com.xensource.xenapi.VM.getAllRecords(VM.java:2662)
at Test.main(Test.java:31)
Test.java
import com.xensource.xenapi.*;
import java.util.Set;
import java.util.Map;
public class Test {
public static void main(String[] args) {
try {
ConnectionHelper.setup("http://:9363");
ConnectionHelper.instance().setSession(Session.loginWithPassword("xen",
"password"));
// Test get record. This will excercise most of the
// marshalling code
Map<VM,VM.Record> vms = VM.getAllRecords();
for(VM.Record record: vms.values()) {
System.out.println(record);;
// Try to start a bunch of domains. This should excercise
// some of the exception handling code
try {
VM vm = VM.getByUuid(record.uuid);
vm.start(false);
} catch (Exception ex) {
ex.printStackTrace();
}
}
Map<Console,Console.Record> consoles = Console.getAllRecords();
for(Console.Record record: consoles.values()) {
System.out.println(record);;
}
Map<Host,Host.Record> hosts = Host.getAllRecords();
for(Host.Record record: hosts.values()) {
System.out.println(record);;
}
Map<HostMetrics,HostMetrics.Record> hostMetrics =
HostMetrics.getAllRecords();
for(HostMetrics.Record record: hostMetrics.values()) {
System.out.println(record);;
}
Map<Network,Network.Record> networks = Network.getAllRecords();
for(Network.Record record: networks.values()) {
System.out.println(record);;
}
Map<PIF,PIF.Record> pifs = PIF.getAllRecords();
for(PIF.Record record: pifs.values()) {
System.out.println(record);;
}
Map<VMMetrics,VMMetrics.Record> vmMetrics =
VMMetrics.getAllRecords();
for(VMMetrics.Record record: vmMetrics.values()) {
System.out.println(record);;
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
with regards, B.Madusudhanan.
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-API] Error:org.apache.xmlrpc.XmlRpcException,
Madusudhanan Bairappan <=
|
|
|
|
|