Problems with D-Bus in Java

Íñigo González inigo.gonzalez at
Thu May 6 03:39:37 PDT 2010

Sorry, I get the interface with this:
DBusInterface interf = conn.getRemoteObject("com.andago.manager",

I have tried another way, creating my own interface which extends
DBusInterface called Dmanager, but when I do this it returns a cast
Dmanager interf = (Dmanager)conn.getRemoteObject("com.andago.manager",

The Dmanager's declaration is this

import org.freedesktop.dbus.DBusInterfaceName;
import org.freedesktop.dbus.DBusInterface;

public interface Dmanager extends DBusInterface{

	public String getAgent();
         public String getCurrentMeasure();
	public String setAgent(int phd, String syst, String manuf, String
	public String deleteAgent();
	public String setMeasure(String att, String val, String un);

El jue, 06-05-2010 a las 11:19 +0100, Matthew Johnson escribió:

> On Wed May 05 17:02, Íñigo González wrote:
> > But in java I am not able to access to that object. This is the code:
> > 
> > DBusConnection conn =
> > DBusConnection.getConnection(DBusConnection.SESSION);
> > if (interf.isRemote())
> > 	conn.callMethodAsync(interf, "deleteAgent");
> You're missing some code here, for example, how you get interf and what type it
> is. What happens if you call interf.deleteAgent() ?
> > When it tries to call the deleteAgent method it returns this error: 
> > 
> > org.freedesktop.dbus.exceptions.DBusExecutionException:
> > $Proxy2.deleteAgent()
> > 	at org.freedesktop.dbus.AbstractConnection.callMethodAsync(Unknown
> > Source)
> Is that really the only error? There should normally be some sort of message
> with the error.
> Matt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the dbus mailing list