java-dbus exception at DBusConnection.requestBusName();

Matthew Johnson dbus at matthew.ath.cx
Tue Apr 1 15:42:44 PDT 2008


On Tue Apr 01 19:01, Ahmad Iqbal wrote:
> 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)"

The problems look like:

   1. the session bus, ensure that the DBUS_SESSION_BUS_ADDRESS has been
   set with the correct address for the session bus.

   2. the system bus, you must edit the configuration file to allow that
   user or connection to own that bus name.

Matt

-- 
www.matthew.ath.cx
D-Bus Java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080401/e91cead6/attachment.pgp 


More information about the dbus mailing list