I'm following the instructions mentioned in the list some years ago about using a subclass of ConnectAuth using ConnectAuthDefault as a sample:

"You could create your own
subclass of ConnectAuth, and override the method:"


public abstract int callback(Credential[] cred);

What I'm doing is just "copying" ConnectAuthDefault to ConnectAuthAlternate and using exactly the same code. The thing is that the callback defined in that class never fires:

ConnectAuth defaultAuth = new ConnectAuthAlternate();

try{

conn = new Connect("qemu+ssh://student@10.164.1.21/system", defaultAuth, 0);

} catch

  (LibvirtException e){ System.out.println("exception caught:"+e);

  System.out.println(e.getError());

}


It works as expected, asks for the user password and connects successfully but it never reaches the callback defined in ConnectAuthAlternate (aka ConnectAuthDefault):

@Override

public int callback(Credential[] cred) {

BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

[...]


I'm using libvirt-java 0.5.1, JNA 4.1 and the current libvirt version that comes with ubuntu 13.10: 1.1.1-0ubuntu8.5


Could you give some light about this?.

Sergio.