You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by nmittal <nm...@rblt.com> on 2009/10/02 03:43:02 UTC

CMS: Installed 3.0.1 but my existing code

fails to run. The code has been running on ActiveMQ CPP 2.2.5. I recompiled
the code with 3.0.1 but get the following error...

No Matching Factory Registered for format := tcp
        FILE: activemq/transport/TransportRegistry.cpp, LINE: 50
        FILE: activemq/core/ActiveMQConnectionFactory.cpp, LINE: 154

thanks for your help.

-- 
View this message in context: http://www.nabble.com/CMS%3A-Installed-3.0.1-but-my-existing-code-tp25709345p25709345.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: CMS: Installed 3.0.1 but my existing code

Posted by nmittal <nm...@rblt.com>.
I fixed the errors by adding...
#include <memory>
#include <activemq/library/ActiveMQCPP.h>

thanks
Nishant


nmittal wrote:
> 
> Hi Tim, as suggested, I added the lines but when I do a make I get the
> following errors... (the same code built fine with 2.2.5
> 
> $ make
> make: Warning: File `../Libraries/ActiveMQ/activemq.cpp' has modification
> time 7 s in the future
> g++ -g -ggdb -I. -I/usr/local/include/activemq-cpp-3.0.1
> -I/usr/local/apr/include/apr-1 -I/usr/local/include/boost -c -o
> ../Libraries/ActiveMQ/activemq.o ../Libraries/ActiveMQ/activemq.cpp
> ../Libraries/ActiveMQ/activemq.cpp: In member function ‘void
> clAMQ::connect()’:
> ../Libraries/ActiveMQ/activemq.cpp:6: error: ‘auto_ptr’ was not
> declared in this scope
> ../Libraries/ActiveMQ/activemq.cpp:6: error: expected primary-expression
> before ‘>’ token
> ../Libraries/ActiveMQ/activemq.cpp:7: error: ‘connectionFactory’ was
> not declared in this scope
> ../Libraries/ActiveMQ/activemq.cpp: In constructor
> ‘clAMQ::clAMQ(std::string&)’:
> ../Libraries/ActiveMQ/activemq.cpp:706: error: ‘activemq::library’ has
> not been declared
> ../Libraries/ActiveMQ/activemq.cpp: In member function ‘void
> clAMQ::cleanup()’:
> ../Libraries/ActiveMQ/activemq.cpp:773: error: ‘activemq::library’ has
> not been declared
> make: *** [../Libraries/ActiveMQ/activemq.o] Error 1
> 
> my header file has the following...
> 
> #include <activemq/util/Config.h>
> #include <cms/Connection.h>
> #include <cms/Session.h>
> #include <cms/TextMessage.h>
> #include <cms/BytesMessage.h>
> #include <cms/MapMessage.h>
> #include <cms/ExceptionListener.h>
> #include <cms/MessageListener.h>
> #include <string>
> 
> using namespace activemq;
> using namespace activemq::core;
> using namespace decaf;
> using namespace decaf::lang;
> using namespace decaf::util;
> using namespace decaf::util::concurrent;
> using namespace cms;
> using namespace std;
> 
> thanks for your help.
> 
> Nishant
> 
> 
> 
> Timothy Bish wrote:
>> 
>> On Thu, 2009-10-01 at 18:43 -0700, nmittal wrote:
>>> fails to run. The code has been running on ActiveMQ CPP 2.2.5. I
>>> recompiled
>>> the code with 3.0.1 but get the following error...
>>> 
>>> No Matching Factory Registered for format := tcp
>>>         FILE: activemq/transport/TransportRegistry.cpp, LINE: 50
>>>         FILE: activemq/core/ActiveMQConnectionFactory.cpp, LINE: 154
>>> 
>>> thanks for your help.
>>> 
>> 
>> You need to call the initialize method for the AMQCPP library:
>> 
>>     activemq::library::ActiveMQCPP::initializeLibrary();
>> 
>> On shutdown you need to call the shutdown method as well to ensure all
>> the open resources are freed.
>> 
>>     activemq::library::ActiveMQCPP::shutdownLibrary();
>> 
>> 
>> Take a look at the examples in the 3.0.1 source distribution.
>> 
>> Regards
>> Tim.
>> -- 
>> Tim Bish
>> http://fusesource.com
>> http://timbish.blogspot.com/
>> 
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Re%3A-CMS%3A-Installed-3.0.1-but-my-existing-code-tp25720081p26133308.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: CMS: Installed 3.0.1 but my existing code

Posted by nmittal <nm...@rblt.com>.
Hi Tim, as suggested, I added the lines but when I do a make I get the
following errors... (the same code built fine with 2.2.5

$ make
make: Warning: File `../Libraries/ActiveMQ/activemq.cpp' has modification
time 7 s in the future
g++ -g -ggdb -I. -I/usr/local/include/activemq-cpp-3.0.1
-I/usr/local/apr/include/apr-1 -I/usr/local/include/boost -c -o
../Libraries/ActiveMQ/activemq.o ../Libraries/ActiveMQ/activemq.cpp
../Libraries/ActiveMQ/activemq.cpp: In member function ‘void
clAMQ::connect()’:
../Libraries/ActiveMQ/activemq.cpp:6: error: ‘auto_ptr’ was not declared
in this scope
../Libraries/ActiveMQ/activemq.cpp:6: error: expected primary-expression
before ‘>’ token
../Libraries/ActiveMQ/activemq.cpp:7: error: ‘connectionFactory’ was not
declared in this scope
../Libraries/ActiveMQ/activemq.cpp: In constructor
‘clAMQ::clAMQ(std::string&)’:
../Libraries/ActiveMQ/activemq.cpp:706: error: ‘activemq::library’ has
not been declared
../Libraries/ActiveMQ/activemq.cpp: In member function ‘void
clAMQ::cleanup()’:
../Libraries/ActiveMQ/activemq.cpp:773: error: ‘activemq::library’ has
not been declared
make: *** [../Libraries/ActiveMQ/activemq.o] Error 1

my header file has the following...

#include <activemq/util/Config.h>
#include <cms/Connection.h>
#include <cms/Session.h>
#include <cms/TextMessage.h>
#include <cms/BytesMessage.h>
#include <cms/MapMessage.h>
#include <cms/ExceptionListener.h>
#include <cms/MessageListener.h>
#include <string>

using namespace activemq;
using namespace activemq::core;
using namespace decaf;
using namespace decaf::lang;
using namespace decaf::util;
using namespace decaf::util::concurrent;
using namespace cms;
using namespace std;

thanks for your help.

Nishant



Timothy Bish wrote:
> 
> On Thu, 2009-10-01 at 18:43 -0700, nmittal wrote:
>> fails to run. The code has been running on ActiveMQ CPP 2.2.5. I
>> recompiled
>> the code with 3.0.1 but get the following error...
>> 
>> No Matching Factory Registered for format := tcp
>>         FILE: activemq/transport/TransportRegistry.cpp, LINE: 50
>>         FILE: activemq/core/ActiveMQConnectionFactory.cpp, LINE: 154
>> 
>> thanks for your help.
>> 
> 
> You need to call the initialize method for the AMQCPP library:
> 
>     activemq::library::ActiveMQCPP::initializeLibrary();
> 
> On shutdown you need to call the shutdown method as well to ensure all
> the open resources are freed.
> 
>     activemq::library::ActiveMQCPP::shutdownLibrary();
> 
> 
> Take a look at the examples in the 3.0.1 source distribution.
> 
> Regards
> Tim.
> -- 
> Tim Bish
> http://fusesource.com
> http://timbish.blogspot.com/
> 
> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Re%3A-CMS%3A-Installed-3.0.1-but-my-existing-code-tp25720081p26132167.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: CMS: Installed 3.0.1 but my existing code

Posted by Timothy Bish <ta...@gmail.com>.
On Thu, 2009-10-01 at 18:43 -0700, nmittal wrote:
> fails to run. The code has been running on ActiveMQ CPP 2.2.5. I recompiled
> the code with 3.0.1 but get the following error...
> 
> No Matching Factory Registered for format := tcp
>         FILE: activemq/transport/TransportRegistry.cpp, LINE: 50
>         FILE: activemq/core/ActiveMQConnectionFactory.cpp, LINE: 154
> 
> thanks for your help.
> 

You need to call the initialize method for the AMQCPP library:

    activemq::library::ActiveMQCPP::initializeLibrary();

On shutdown you need to call the shutdown method as well to ensure all
the open resources are freed.

    activemq::library::ActiveMQCPP::shutdownLibrary();


Take a look at the examples in the 3.0.1 source distribution.

Regards
Tim.
-- 
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/