Disconnected in DBusConnection.getConnection

Janne Kario janne.kario at gmail.com
Sun Sep 7 14:18:34 PDT 2008


dbus 1.2.1
dbus-java 2.5
machine is ARM
java vm is jamvm 1.5.1

For some reason calling Hello of org.freedesktop.DBus causes
connection to be disconnected. Sometimes I manage to get past the
DBusConnection.getConnection method but after that the subsequent dbus
call causes the connection to be disconnected. Any ideas? DBus seems
to be working because I can operate from the command line using
dbus-send. Python bindings also work.


[.()] Creating new bus connection to: unix:path=/var/run/dbus/system_bus_socket
[.()] Shrinking
[.()] Connecting to unix: {path=/var/run/dbus/system_bus_socket}
[.()] Monitoring outbound queue
[.()] Creating message with serial 6
[.()] Appending sig: yyyy data: [66, 1, 0, 1]
[.()] Appending sig: ua(yv) data: [6, [[1, [o,
/org/freedesktop/DBus]], [6, [s, org.freedesktop.DBus]], [2, [s,
org.freedesktop.DBus]], [3, [s, Hello]]]]
[.()] Creating message with serial 7
[.()] Appending sig: yyyy data: [66, 4, 0, 1]
[.()] Appending sig: ua(yv) data: [8, [[1, [o, /]], [2, [s,
org.freedesktop.DBus.Local]], [3, [s, Disconnected]]]]
[.()] Appended body, type: null start: 128 end: 128 size: 0
[.()] marshalled size ([B at 2b1a1f18): 000000     00 00 00 00
                                ....

[.()] Enqueueing Message MethodCall(0,6) {
Destination=>org.freedesktop.DBus, Member=>Hello,
Interface=>org.freedesktop.DBus, Path=>/org/freedesktop/DBus } { }
[.()] Notifying outgoing thread
[.()] Dequeueing MethodCall(0,6) { Destination=>org.freedesktop.DBus,
Member=>Hello, Interface=>org.freedesktop.DBus,
Path=>/org/freedesktop/DBus } { }
[.()] Got message: MethodCall(0,6) {
Destination=>org.freedesktop.DBus, Member=>Hello,
Interface=>org.freedesktop.DBus, Path=>/org/freedesktop/DBus } { }
[.()] <= MethodCall(0,6) { Destination=>org.freedesktop.DBus,
Member=>Hello, Interface=>org.freedesktop.DBus,
Path=>/org/freedesktop/DBus } { }
[.()] Writing all 40 buffers simultaneously to Unix Socket
[.()] Handling incoming signal: Disconnected(0,8) {
Member=>Disconnected, Interface=>org.freedesktop.DBus.Local, Path=>/ }
{ }
[.()] Handling Disconnected signal from bus
[.()] Creating message with serial 8
[.()] Appending sig: yyyy data: [66, 3, 0, 1]
[.()] Handling Disconnected signal from bus
[.()] Creating message with serial 9
[.()] Appending sig: yyyy data: [66, 3, 0, 1]
[.()] Appending sig: ua(yv) data: [8, [[4, [s,
org.freedesktop.DBus.Local.Disconnected]], [5, [u, 0]], [6, [s,
org.freedesktop.DBus.Local]], [8, [g, s]]]]
[.()] Appending sig: ua(yv) data: [9, [[4, [s,
org.freedesktop.DBus.Local.Disconnected]], [5, [u, 0]], [6, [s,
org.freedesktop.DBus.Local]], [8, [g, s]]]]
[.()] Appending sig: s data: [Disconnected]
[.()] Appending sig: s data: [Disconnected]
[.()] Disconnecting DBusConnection
[.()] Creating message with serial 10
[.()] Appending sig: yyyy data: [66, 3, 0, 1]
org.osgi.framework.BundleException: Activator start error.
   at org.apache.felix.framework.Felix._startBundle(Felix.java:1654)
   at org.apache.felix.framework.Felix.startBundle(Felix.java:1544)
   at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:371)
   at org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:82)
   at org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:276)
   at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:167)
   at java.lang.Thread.run(Thread.java:743)
Caused by: org.freedesktop.dbus.exceptions.DBusException: Disconnected
   at org.freedesktop.dbus.DBusConnection.<init>(DBusConnection.java:184)
   at org.freedesktop.dbus.DBusConnection.getConnection(DBusConnection.java:142)
   at smsgateway.Activator.start(Activator.java:27)
   at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:591)
   at org.apache.felix.framework.Felix._startBundle(Felix.java:1610)
   ...6 more
org.freedesktop.dbus.exceptions.DBusException: Disconnected
-> [.()] Appending sig: ua(yv) data: [10, [[4, [s,
org.freedesktop.DBus.Local.Disconnected]], [5, [u, 0]], [6, [s,
org.freedesktop.DBus.Local]], [8, [g, s]]]]
[.()] Appending sig: s data: [Disconnected]
[.()] Disconnecting Abstract Connection
[.()] Got message: null
[.()] Flushing outbound queue and quitting
[.()] <= null
[.()] Disconnecting Transport
[.()] Closing Message Reader
[.()] Closing Message Writer



<java>
DBusConnection conn = DBusConnection.getConnection(DBusConnection.SYSTEM);
SIM sim = (SIM) conn.getRemoteObject("org.freesmartphone.GSM",
		"/org/freesmartphone/GSM/SIM", SIM.class);
System.out.println("auth status: " + sim.GetAuthStatus());
conn.callWithCallback(sim, "GetAuthStatus", this);
</java>


More information about the dbus mailing list