Sorry for the immediate repost...<br><br>With Sun JRE:<br>java version "1.5.0_16"<br>Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)<br>Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing)<br>
<br>This problem goes away...<br><br>[org.freedesktop.dbus.AbstractConnection$_sender.run()] Got message: MethodCall(0,5) { Interface=>org.freedesktop.DBus, Signature=>s, Destination=>org.freedesktop.DBus, Path=>/org/freedesktop/DBus, Member=>AddMatch } { type='signal',member='Sig',interface='framez.io.dbus.FrzRemoteSignal' }<br>
[org.freedesktop.dbus.MessageWriter.writeMessage()] <= MethodCall(0,5) { Interface=>org.freedesktop.DBus, Signature=>s, Destination=>org.freedesktop.DBus, Path=>/org/freedesktop/DBus, Member=>AddMatch } { type='signal',member='Sig',interface='framez.io.dbus.FrzRemoteSignal' }<br>
<br>It looks like GNU Classpath - I will post a patch... If anyone has more info please let me know.<br><br>thanks<br>-Ed<br><br><br><div class="gmail_quote">On Sun, Sep 13, 2009 at 9:41 PM, Ed Hemphill <span dir="ltr"><<a href="mailto:ed@izuma.net">ed@izuma.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
I was hoping someone could assist with the below issues. It may be<br>
something obvious to DBus as I am new to it.<br>
I have seen some posts from Matthew Johnson in the past which were<br>
quite useful, but 'FrzRemoteSignal' is in a package.<br>
<br>
<br>
When trying to add a SigHandler for a DBusSignal I am getting the<br>
following exception:<br>
<br>
type.getName: org.freedesktop.DBus type.getSimpleName: DBus<br>
0 [main] ERROR Broadcast - Error: Member name<br>
'FrzRemoteSignal$Sig' is invalid--> [<br>
org.freedesktop.dbus.exceptions.DBusException ] Member name<br>
'FrzRemoteSignal$Sig' is invalid --><br>
org.freedesktop.dbus.exceptions.DBusException: Member name<br>
'FrzRemoteSignal$Sig' is invalid<br>
at org.freedesktop.dbus.DBusConnection.addSigHandler(Unknown Source)<br>
at org.freedesktop.dbus.AbstractConnection.addSigHandler(Unknown Source)<br>
at framez.io.dbus.FrzDBusDrv.startFrzSigListen(FrzDBusDrv.java:96)<br>
at framez.io.dbus.FrzDBusDrv.connect(FrzDBusDrv.java:70)<br>
at DBusBroadcastSigTest.initApp(DBusBroadcastSigTest.java:96)<br>
at framez.core.controller.FrzControllerExec.main(FrzControllerExec.java:104)<br>
<br>
What I find weird is that the Member name is being called<br>
FrzRemoteSignal$Sig - where as DBus's own information does not have<br>
this dollar sign:<br>
<br>
[.()] Handling incoming signal: DBusSignal(1,3) { Signature=>s,<br>
Sender=>org.freedesktop.DBus, Destination=>:1.201,<br>
Member=>NameAcquired, Interface=>org.freedesktop.DBus,<br>
Path=>/org/freedesktop/DBus } { framez.tests.dbus.broadcast }<br>
<br>
I have ran across a bug in GNU Classpath 0.98 (which is patched now)<br>
for Class.getName and Class.getSimpleName - where both of these were<br>
being reported as the same. This bug is patched but wonder if this<br>
could be another problem like that...<br>
<br>
<br>
As above, using the dbus-java-debug libraries...<br>
<br>
[.()] Dequeueing MethodCall(0,3) { Signature=>s,<br>
Destination=>org.freedesktop.DBus, Member=>AddMatch,<br>
Interface=>org.freedesktop.DBus, Path=>/org/freedesktop/DBus } {<br>
type='signal',member='FrzRemoteSignal$Sig',interface='framez.io.dbus.FrzRemoteSignal'<br>
}<br>
[.()] Got message: MethodCall(0,3) { Signature=>s,<br>
Destination=>org.freedesktop.DBus, Member=>AddMatch,<br>
Interface=>org.freedesktop.DBus, Path=>/org/freedesktop/DBus } {<br>
type='signal',member='FrzRemoteSignal$Sig',interface='framez.io.dbus.FrzRemoteSignal'<br>
}<br>
[.()] <= MethodCall(0,3) { Signature=>s,<br>
Destination=>org.freedesktop.DBus, Member=>AddMatch,<br>
Interface=>org.freedesktop.DBus, Path=>/org/freedesktop/DBus } {<br>
type='signal',member='FrzRemoteSignal$Sig',interface='framez.io.dbus.FrzRemoteSignal'<br>
}<br>
[.()] Writing all 40 buffers simultaneously to Unix Socket<br>
[.()] => Error(1,5) { Signature=>s, Sender=>org.freedesktop.DBus,<br>
Destination=>:1.195, Reply Serial=>3, Error<br>
Name=>org.freedesktop.DBus.Error.MatchRuleInvalid } { Member name<br>
'FrzRemoteSignal$Sig' is invalid<br>
}<br>
[.()] Handling incoming error: Error(1,5) { Signature=>s,<br>
Sender=>org.freedesktop.DBus, Destination=>:1.195, Reply Serial=>3,<br>
Error Name=>org.freedesktop.DBus.Error.MatchRuleInvalid } { Member<br>
name 'FrzRemoteSignal$Sig' is invalid<br>
}<br>
<br>
<br>
<br>
FrzRemoteSignal DBusInterface-----------><br>
<br>
package framez.io.dbus;<br>
<br>
import org.freedesktop.dbus.DBusSignal;<br>
import org.freedesktop.dbus.DBusInterface;<br>
import org.freedesktop.dbus.Struct;<br>
import org.freedesktop.dbus.exceptions.DBusException;<br>
<br>
import framez.core.signal.FrzSignal;<br>
<br>
/** This class is used by d-bus for transmission of a FrzSignal<br><br>
* The FrzSignal is essentially represented by two Struct(s) <br><br>
* See org.freedesktop.dbus for why this must be DBusSignal inside a<br>
DBusInterface.<br>
* @author ed<br>
* @see FrzSignal<br>
*/<br>
public interface FrzRemoteSignal extends DBusInterface {<br>
/** We only have one signal for this class right now, Send a signal */<br>
public static class Sig extends DBusSignal {<br>
public final Struct signal;<br>
public final Struct data;<br>
public Sig(String path, Struct signal, Struct data )<br>
throws DBusException {<br>
super(path, signal, data);<br>
this.signal = signal;<br>
this.data = data;<br>
}<br>
}<br>
}<br>
<br>
<br>
<br>
<br>
<br>
in other code - adding the sigHandler----------><br>
<br>
public void startFrzSigListen() {<br>
if (remoteSigHandler != null)<br>
try {<br>
conn.addSigHandler(FrzRemoteSignal.Sig.class, remoteSigHandler);<br>
} catch (DBusException e) {<br>
FrzLog.error("Error: " + e.getMessage() + "-->" + FrzLog.stringifyTrace(e));<br>
} catch (ClassCastException e) {<br>
FrzLog.error("Error: " + e.getMessage() + "-->" + FrzLog.stringifyTrace(e));<br>
}<br>
else<br>
FrzLog.error("remoteSigHandler is uninitialized.");<br>
}<br>
<br>
<br>
remoteSigHandler is just an instance of...<br>
<br>
public class FrzRemoteSigHandler implements DBusSigHandler {<br>
public void handle(DBusSignal s) {<br>
if(s instanceof FrzRemoteSignal.Sig) {<br>
FrzRemoteSignal.Sig sig = (FrzRemoteSignal.Sig) s;<br>
FrzSignal frzsig = null;<br>
FrzLog.debug("Got incoming remote signal: " +<br>
((FrzSignal.SigStruct) sig.signal).Code);<br>
if(((FrzSignal.SigStruct)sig.signal).dataTypeName != "") // if the<br>
signal had a type, then...<br>
frzsig = new FrzSignal( (FrzSignal.SigStruct) sig.signal,<br>
sig.data ); // try to create with data<br>
else // otherwise just a Signal, but no FrzSigData<br>
frzsig = new FrzSignal( (FrzSignal.SigStruct) sig.signal, null );<br>
sigQueue.enqueSignal(frzsig); // send to event queue<br>
}<br>
}<br>
}<br>
<br>
<br>
I am happy to post more code, but this is the crux of the DBus<br>
related... any help appreciated<br>
<font color="#888888"><br>
-Ed<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Ed Hemphill<br>+1.512.417.8600<br>