dbus java DirectConnection FatalDBusException

Edgar Domingues edgar.domingues at gmail.com
Wed Jan 11 11:24:38 PST 2012


Hi,

I'm trying to run dbus in java using DirectConnection.
The client connects to the server and calls remote methods with no problems.
But when I call the disconnect method in the client both Server and
Client crashes.
I tested my code both in linux and windows and the problem is the same.
Code and exception description follows.

Server code:
	    	DirectConnection dc = new
DirectConnection("tcp:host=127.0.0.1,port=12345,listen=true");
	    	dc.exportObject("/hello", new ServerInterfaceImp());
Client code:
	DirectConnection dc = new DirectConnection("tcp:host=127.0.0.1,port=12345");
    	ServerInterface remote = (ServerInterface)
dc.getRemoteObject("/hello");
    	String rv = remote.hello(name);
    	System.out.println("hello("+name+"): "+rv);    	
    	dc.disconnect(); // exception thrown after calling this

The server exception is:
org.freedesktop.dbus.exceptions.FatalDBusException: Underlying
transport returned EOF
	at org.freedesktop.dbus.AbstractConnection.readIncoming(Unknown Source)
	at org.freedesktop.dbus.AbstractConnection.access$000(Unknown Source)
	at org.freedesktop.dbus.AbstractConnection$_thread.run(Unknown Source)
The client exception is:
org.freedesktop.dbus.exceptions.FatalDBusException: Socket closed
	at org.freedesktop.dbus.AbstractConnection.readIncoming(Unknown Source)
	at org.freedesktop.dbus.AbstractConnection.access$000(Unknown Source)
	at org.freedesktop.dbus.AbstractConnection$_thread.run(Unknown Source)

Can anyone help me.

Best Regards,
Edgar Domingues


More information about the dbus mailing list