Problems with D-Bus in Java

Íñigo González inigo.gonzalez at
Wed May 5 08:02:33 PDT 2010

Hi, I am trying to communicate a C++ Qt program with a Java program
using D-Bus. What I do is to register a QT object on the dbus and I want
another application to send data to it. I have tried to do that
communication between 2 QT apps and that has worked great.

I register the QT object in dbus like this:

hdpManager = new Dmanager();


And the Dmanager.h code is this:

class Dmanager: public QObject
    Agent *ag;
    Measure *medida;


public slots:
  Q_SCRIPTABLE QString getAgent();
  Q_SCRIPTABLE QString getCurrentMeasure();
  Q_SCRIPTABLE QString setAgent(int phd, QString syst, QString manuf,
QString model);
  Q_SCRIPTABLE QString deleteAgent();
  Q_SCRIPTABLE QString setMeasure(QString att, QString val, QString un);

But in java I am not able to access to that object. This is the code:

DBusConnection conn =
if (interf.isRemote())
	conn.callMethodAsync(interf, "deleteAgent");

When it tries to call the deleteAgent method it returns this error: 

	at org.freedesktop.dbus.AbstractConnection.callMethodAsync(Unknown

What is the reason for getting this error?

Thank you

More information about the dbus mailing list