<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello everybody,<br>
<br>
I have successfully managed private cloud using command line. And
then i tried to write a simple program to test Java API. But when i
use Java API, i haven't authorized. I don't know why because i have
had one_auth file & i have successfully deployed virtual machine
running in computer nodes by using command line. My Netbeans IDE
runs under oneadmin user.<br>
<br>
<u>Here is my program in Java:</u><br>
package exampleusingopennebulaapi;<br>
import org.opennebula.client.Client;<br>
import org.opennebula.client.OneResponse;<br>
import org.opennebula.client.host.HostPool;<br>
<br>
/**<br>
*<br>
* @author oneadmin<br>
*/<br>
public class ExampleUsingOpenNebulaAPI {<br>
public static void main(String[] args) throws Exception {<br>
Client client = new Client();<br>
OneResponse or = HostPool.info(client);<br>
if (or.isError()) {<br>
System.out.println("Error message: " +
or.getErrorMessage());<br>
}<br>
else{<br>
System.out.println("No errors. This is xml content: " +
or.getMessage());<br>
} <br>
}<br>
}<br>
<br>
And this is result i got:<br>
Error message: [HostPoolInfo] User couldn't be authenticated,
aborting call.<br>
<br>
Can somebody help me? Thanks in advance.<br>
<pre class="moz-signature" cols="72">--
Hoang Thai Xuan Khoa
Ho Chi Minh city, Vietnam</pre>
</body>
</html>