Java DBus Namespace problem.

Matthew Johnson dbus at matthew.ath.cx
Tue Mar 2 01:17:52 PST 2010


On Tue Mar 02 09:12, Arigead wrote:
> Sorry to post again, but I'm afraid I'm the bearer of bad tidings I
> tried the nested interface example and Eclipse wasn't too happy with that:
> 
> The nested type navit cannot hide an enclosing type

Ah, that's interesting. I admit I've not tried it with the names being the same

> The other method of using the annotation to correct the class name gives
> me a problem at runtime when casting:
> 
> nav n = (nav) dbusConnection.getRemoteObject(NavitBusName, NavitPath);
> 
> Caused by: java.lang.ClassCastException: $Proxy6 cannot be cast to
> org.navit_project.nav
> 
> if I change the name to navit n= (navit)
> dbusConnection.getRemoteObject() it's happy.

Hmm, try passing the class explicitly to dbusConnection.getRemoteObject. When
you use the version without the class it introspects the given path to work out
which interfaces it supports. Sounds like that path does not claim to support
that interface.

Matt
-- 
www.matthew.ath.cx
D-Bus Java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100302/3bb1070a/attachment.pgp>


More information about the dbus mailing list