problem in sending data using alljoyn

asked 2015-08-09 22:35:47 -0800

startxlabstestuser gravatar image

I am sending string after converting to byte array using alljoyn, that string contain image (after converting in String using Base64) also. it is working fine, but in case of some images it gives following error,

08-08 18:55:21.158  20724-21095/co.coinflipsrl.infomage E/ALLJOYN﹕ 20.237 ****** ERROR ALLJOYN external          ...oyn_core/src/ |  0x900d
08-08 18:55:21.159  20724-21095/co.coinflipsrl.infomage E/ALLJOYN_JAVA﹕ 20.238 ****** ERROR ALLJOYN_JAVA external     .../jni/ |  0x0001
08-08 18:55:21.161  20724-21095/co.coinflipsrl.infomage E/SimpleClient﹕ SimpleInterface.Ping(): org.alljoyn.bus.MarshalBusException: cannot marshal class [B into 'ay'
org.alljoyn.bus.MarshalBusException: cannot marshal class [B into 'ay'
    at org.alljoyn.bus.MsgArg.marshal(
    at org.alljoyn.bus.MsgArg.marshal(
    at org.alljoyn.bus.ProxyBusObject.methodCall(Native Method)
    at org.alljoyn.bus.ProxyBusObject.access$300(
    at org.alljoyn.bus.ProxyBusObject$Handler.invoke(
    at java.lang.reflect.Proxy.invoke(
    at $Proxy2.Ping(Unknown Source)
    at co.coinflipsrl.infomage.sharing.alljoynshare.ClientFragment$BusHandler.handleMessage(
    at android.os.Handler.dispatchMessage(
    at android.os.Looper.loop(
 Caused by: org.alljoyn.bus.BusException: ER_BUS_BAD_VALUE
    at org.alljoyn.bus.MsgArg.set(Native Method)
    at org.alljoyn.bus.MsgArg.marshal(

sending code is:

 sendUiMessage(MESSAGE_PING, msg.obj);
                    byte[] sentObj = (byte[]) msg.obj;
                    Object reply = mSimpleInterface.Ping((byte[]) msg.obj);
                    byte[] receivedObj = (byte[]) reply;
                    if (Arrays.equals(sentObj, receivedObj)) {
                        sendUiMessage(MESSAGE_PING_REPLY, true);
                    } else {
                        sendUiMessage(MESSAGE_PING_REPLY, false);

receiving code is:

public byte[] Ping(byte[] inStr) {

    sendUiMessage(MESSAGE_PING, inStr);

     //Simply echo the ping message.
    sendUiMessage(MESSAGE_PING_REPLY, inStr);
    return inStr;

/* Helper function to send a message to the UI thread. */
private void sendUiMessage(int what, Object obj) {
    mHandler.sendMessage(mHandler.obtainMessage(what, obj));
edit retag flag offensive close merge delete


you might get a better response over on the mailing list.

ry.jones ( 2015-08-10 00:20:21 -0800 )edit