On Thu, 2009-03-26 at 17:55 +0100, Eduardo Montoya wrote: > Hello, I have upgraded to the new 2.2.5 version of activemq-cpp > > but when I receive a bytesmessage within onMessage listener method, > I get the following error: > > < 836> 26 March 2009 05:34:55 PM[ERROR] - at [.\MyDispatcher.cpp ] > (MyDispatcher::onMessage ) at line 110 ByteArrayInputStream::read - Buffer > has not been initialized > FILE: ..\src\main\decaf\io\ByteArrayInputStream.cpp, LINE: 117 > FILE: ..\src\main\decaf\io\ByteArrayInputStream.cpp, LINE: 146 > FILE: ..\src\main\decaf\io\DataInputStream.cpp, LINE: 171 > FILE: > ..\src\main\activemq\connector\openwire\commands\ActiveMQBytesMessage.cpp, > LINE: 324 > FILE: .\MyDispatcher.cpp:MyDispatcher::onMessage, LINE: 99 > > the code is as follows: > > void MyDispatcher::onMessage( const Message* message ) > { > const BytesMessage* b = dynamic_cast<const BytesMessage* >( > message ); > if( b != NULL ) > { > /* OLD HACK > * b->reset(); // this was my workaround hack using the > previous version 2.2.4 (i made reset method const) > */ > try > { > msg->readInt(); > } > MY_CATCH_RETHROW(Exception) > MY_CATCH_QL_EXCEPTION() > MY_CATCH_STD_EXCEPTION() > MY_CATCHALL_THROW(MyException) > } > } > > please let me know if you are able to figure out what i am doing wrong! >
Can you open a new issue and attach your sample code that demonstrates the problem. I don't see anything wrong in your sample code. Regards Tim. -- Tim Bish http://fusesource.com http://timbish.blogspot.com/