adding signal handler in java

Matthew Johnson dbus at
Wed Dec 13 03:41:21 PST 2006

On Tue, 12 Dec 2006, Henrik Petander wrote:

> Hi,


> My code can create a connection to DBus session bus, but adding of the
> signal handler  fails with the following message from the dbus
> exception:
> "Interface name 'TestSignalInterface' is invalid".
> I am not sure, if I am missing something obvious here and would
> appreciate any advice on this.

Aha, interesting problem. The way the bindings work is the interface
name is derived from package.interface of the DBusInterfaces you
export. In this case, since there is no package the interface is simply
'TestSignalInterface'. However, D-Bus enforces that interface names must
have at least one '.' in them, IE, you cannot have them in the top level

This is something I'd not really realized and so haven't documented or
have any checks with more informative error messages in. I shall add
them now I've noticed, thanks (-:

If you move TestSignalInterface into a package then it works.

Matthew Johnson

More information about the dbus mailing list