Hi people, I am new using libvirt for Java<br><br>I created a class to test my conecction with XEN, but it is throwing a exception that I can't figure out how I solve this.<br>Does anyone knoe how to configure it correctly?<br>

I cat use this class from the command line:<br>$ javac -classpath /usr/java/jdk1.6.0_34/bin/libvirt-0.4.9.jar test.java<br>$ java -classpath .:/usr/java/jdk1.6.0_34/bin/jna.jar:/usr/java/jdk1.6.0_34/bin/libvirt-0.4.9.jar test<br>

and it connect to the XEN.<br><br>But when I put the code on my eclipse it doesn't work any more.<br><br>...<br>conn = new Connect("xen:///", true);<br>....<br><br>libvir: XML-RPC error : authentication failed: Error checking for authorization org.libvirt.unix.manage: Remote Exception invoking org.freedesktop.PolicyKit1.Authority.CheckAuthorization() on /org/freedesktop/PolicyKit1/Authority at name org.freedesktop.PolicyKit1: org.freedesktop.PolicyKit1.Error.Failed: Action org.libvirt.unix.manage is not registered<br>

exception caught:org.libvirt.LibvirtException: authentication failed: Error checking for authorization org.libvirt.unix.manage: Remote Exception invoking org.freedesktop.PolicyKit1.Authority.CheckAuthorization() on /org/freedesktop/PolicyKit1/Authority at name org.freedesktop.PolicyKit1: org.freedesktop.PolicyKit1.Error.Failed: Action org.libvirt.unix.manage is not registered<br>

<br>level:VIR_ERR_ERROR<br>code:VIR_ERR_AUTH_FAILED<br>domain:VIR_FROM_RPC<br>hasConn:false<br>hasDom:false<br>hasNet:false<br>message:authentication failed: Error checking for authorization org.libvirt.unix.manage: Remote Exception invoking org.freedesktop.PolicyKit1.Authority.CheckAuthorization() on /org/freedesktop/PolicyKit1/Authority at name org.freedesktop.PolicyKit1: org.freedesktop.PolicyKit1.Error.Failed: Action org.libvirt.unix.manage is not registered<br>

<br>str1:authentication failed: %s<br>str2:Error checking for authorization org.libvirt.unix.manage: Remote Exception invoking org.freedesktop.PolicyKit1.Authority.CheckAuthorization() on /org/freedesktop/PolicyKit1/Authority at name org.freedesktop.PolicyKit1: org.freedesktop.PolicyKit1.Error.Failed: Action org.libvirt.unix.manage is not registered<br>

<br>str3:null<br>int1:-1<br>int2:-1<br><br>Exception in thread "main" java.lang.NullPointerException<br>    at TestLibVirt.main(TestLibVirt.java:88)<br clear="all"><br>-- <br><div><b><font color="#000099">-- Felipe Oliveira Gutierrez</font></b></div>


<div><b><font color="#000099">-- </font></b><a href="mailto:lipe.82@gmail.com" target="_blank"><b><font color="#000099">lipe.82@gmail.com</font></b></a></div>
<div><b><font color="#000099">-- <a href="https://sites.google.com/site/lipe82/Home/diaadia" target="_blank">https://sites.google.com/site/lipe82/Home/diaadia</a></font></b></div><br>