java-dbus exception at DBusConnection.requestBusName();

Ahmad Iqbal ahmad.iqbal at deri.org
Tue Apr 1 11:01:42 PDT 2008


Hi all,

I am using java binding with dbus to deploy new SYSTEM/SESSION bus with
the name:  ie.deri.dbus.testdbusserver but the code at line 3 originate
exception
"Cannot Resolve Session Bus Address
    at org.freedesktop.dbus.DBusConnection.getConnection(Unknown Source)".

1: DBusConnection connection;
2: assert this.connection != null;
3: this.connection = DBusConnection.getConnection(DBusConnection.SESSION);
4: this.connection.requestBusName("ie.deri.dbus.testdbusserver");

Similarly, if I modify line 3 for system bus i.e.
3: this.connection = DBusConnection.getConnection(DBusConnection.SYSTEM);

then compiler at line 4 originates an exception
"Connection ":1.25" is not allowed to own the service
"ie.deri.dbus.testdbusserver" due to security policies in the
configuration file
    at org.freedesktop.dbus.DBusConnection.requestBusName(Unknown Source)"

I will highly appreciate to fixing this problem.

Thanks a lot.

--
Ahmad


More information about the dbus mailing list