You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by sivasnp <si...@rockwellcollins.com> on 2017/08/10 22:10:24 UTC

JMS exception when a Property is sent to java broker from qpid-cpp

Hi,
   I am getting an exception when a property value is sent from
qpid-cpp(1.35) to a client which is running a java broker. 

From Sender(qpid-cpp) I am doing the following:
qpid::messaging::message msg;
std::string id = "xyztry";
msg.setProperty("a", id);
msg.getProperties()["a"].setEncoding("utf8");

On the receiver, I am getting the following error
JMS exception : getString("a") failed as value of type class [B is an array.

Additionally, when I capture messages through wireshark, I see the type of
"a" is uimplemented type".

Any help is appreciated.

Thanks,
Siva.





--
View this message in context: http://qpid.2158936.n2.nabble.com/JMS-exception-when-a-Property-is-sent-to-java-broker-from-qpid-cpp-tp7665646.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: JMS exception when a Property is sent to java broker from qpid-cpp

Posted by Gordon Sim <gs...@redhat.com>.
On 10/08/17 23:10, sivasnp wrote:
> Hi,
>     I am getting an exception when a property value is sent from
> qpid-cpp(1.35) to a client which is running a java broker.
> 
>  From Sender(qpid-cpp) I am doing the following:
> qpid::messaging::message msg;
> std::string id = "xyztry";
> msg.setProperty("a", id);
> msg.getProperties()["a"].setEncoding("utf8");
> 
> On the receiver, I am getting the following error
> JMS exception : getString("a") failed as value of type class [B is an array.
> 
> Additionally, when I capture messages through wireshark, I see the type of
> "a" is uimplemented type".
> 
> Any help is appreciated.

Is the sender sending over AMQP 0-10 (as opposed to AMQP 1.0)? Which 
version of the java broker are you using?

I did a test with the attached send.cpp and 6.1.3 of the broker. When 
sending over AMQP 1.0, the property value is correctly encoded as a 
string (typecode 0xa1). Whether sending over AMQP 0-10 or AMQP 1.0, a 
JMS receiver example (also attached) can successfully retrieve the 
property via getStringProperty().