You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by aguestrush <ag...@gmail.com> on 2009/07/16 10:33:45 UTC

[help]A problem of the "xml-exchange"

hi,

when I try the client example "
/qpid/trunk/qpid/cpp/examples/xml-exchange
"
when I run
"
session.exchangeDeclare(arg::exchange="xml", arg::type="xml");

"

there is a error that shows"

2009-jul-16 16:09:08 warning Exception received from broker: command-invalid: co
mmand-invalid: Exchange type not implemented: xml (.\qpid\broker\SessionAdapter.
cpp:108) [caused by 1 \x07:\x01]

"

How can I solve this problem?

2009-07-16 



aguestrush 

Re: [help]A problem of the "xml-exchange"

Posted by Gordon Sim <gs...@redhat.com>.
aguestrush wrote:
> hi,
> 
> when I try the client example "
> /qpid/trunk/qpid/cpp/examples/xml-exchange
> "
> when I run
> "
> session.exchangeDeclare(arg::exchange="xml", arg::type="xml");
> 
> "
> 
> there is a error that shows"
> 
> 2009-jul-16 16:09:08 warning Exception received from broker: command-invalid: co
> mmand-invalid: Exchange type not implemented: xml (.\qpid\broker\SessionAdapter.
> cpp:108) [caused by 1 \x07:\x01]
> 
> "
> 
> How can I solve this problem?

The broker has not loaded the XML exchange plugin which is why it does
not recognise the type.

How are you running the broker? Did you make install? Or are you running
it from the build tree? The xml plugin is called xml.so and is built in
src/.libs/ and installed into the default broker module directory e.g.
/usr/lib64/qpid/daemon/xml.so.

If the module has been installed into the default directory then it
should be automatically loaded. If not you will need to explicitly load
it by adding '--load-module /path/to/qpid/cpp/src/.libs/xml.so' to the
command line args for your broker.

If you start your broker with --log-enable info+ you will see:

  info Loaded Module: /usr/lib64/qpid/daemon/xml.so

and then

  info Registered xml exchange

if the module is loaded correctly.

If the plugin was not built, its probably because you did not have the
required dependencies installed (you can grep for HAVE_XML in the
config.log). From the INSTALLATION text file referenced by the README
you need:

  Optional XML exchange requires:
  * xqilla  <http://xqilla.sourceforge.net/HomePage>     (2.0.0)
  * xerces-c <http://xerces.apache.org/xerces-c/>        (2.7.0)

and if your system supports yum the following should install the
necessary packages for you:

   yum install xqilla-devel xerces-c-devel

You then need to re-run ./configure and recompile. That should then
build the XML exchange plugin.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org