qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Swiatek <g.swia...@teles.at>
Subject Re: Invalid URL
Date Wed, 02 Feb 2011 09:20:28 GMT
Hi,

the problem is caused by static linking.
I linked my application using the order (-lqpidclient -lqpidcommon).

If I use dynamic libraries all is fine.

Regards,
Grzegorz

On 2/1/2011 6:08 PM, Grzegorz Swiatek wrote:
> Hi,
>
> I tried a C++ code with many hosts and got Invalid URL exception,
> but the URL should be valid according to amqp.0-10.
>
> Program output:
> open connection
> Invalid URL: amqp:tcp:10.220.11.35:5672,tcp:10.220.11.36:5672
> (qpid/Url.cpp:237)
>
> What I am making wrong here?
>
> Thanks in advance,
> Grzegorz
>
> #include <qpid/client/Connection.h>
> #include <qpid/client/Session.h>
> #include <qpid/Url.h>
> #include <iostream>
>
>
> using namespace qpid::client;
> using qpid::Url;
>
> using namespace std;
>
> int main(int argc, char** argv) {
>
>
> Connection connection;
>
> try {
>
> cout << "open connection" << endl;
>
> Url url("amqp:tcp:10.220.11.35:5672,tcp:10.220.11.36:5672");
> connection.open(url);
>
> cout << "new session" << endl;
>
> Session session = connection.newSession();
>
> cout << "close connection" << endl;
>
> connection.close();
> } catch (const std::exception& ex) {
> cerr << ex.what() << endl;
> }
> }
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>


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


Mime
View raw message