You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Thomas Johnson (JIRA)" <ji...@apache.org> on 2008/02/06 14:34:35 UTC

[jira] Created: (AMQCPP-166) MapMessage does not send mapped fields

MapMessage does not send mapped fields
--------------------------------------

                 Key: AMQCPP-166
                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
             Project: ActiveMQ C++ Client
          Issue Type: Bug
          Components: Openwire
    Affects Versions: 2.1.3
         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
            Reporter: Thomas Johnson
            Assignee: Nathan Mittler


Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:

				MapMessage *message=session->createMapMessage();
				message->setInt("MsgNum",ix);
				message->setString("Thread",threadIdStr.c_str());
                producer->send( message );

and the HelloWorldConsumer to receive it:

			const MapMessage * mapMessage=
				dynamic_cast<const MapMessage *>(message);
			if (mapMessage!=NULL) {
				int num=mapMessage->getInt("MsgNum");
				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
			} else {
				printf("Not a map message\n");
			}

The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQCPP-166.
---------------------------------

    Resolution: Fixed

Fixed in SVN: 620490

> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>             Fix For: 2.2
>
>         Attachments: main.cpp
>
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "dj (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42270#action_42270 ] 

dj commented on AMQCPP-166:
---------------------------

i have the same problem,who can tell me how to solve this?thanks

> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>             Fix For: 2.2
>
>         Attachments: main.cpp
>
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish reassigned AMQCPP-166:
-----------------------------------

    Assignee: Timothy Bish  (was: Nathan Mittler)

> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish updated AMQCPP-166:
--------------------------------

    Fix Version/s: 2.2

> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>             Fix For: 2.2
>
>         Attachments: main.cpp
>
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "Thomas Johnson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41237#action_41237 ] 

Thomas Johnson commented on AMQCPP-166:
---------------------------------------

Never mind the Marshall part, I did not see the TextMessage get Marshalled either and it works fine.


> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Nathan Mittler
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "Thomas Johnson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Johnson updated AMQCPP-166:
----------------------------------

    Attachment: main.cpp

Here is the example code modified to use the MapMessage.  

> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>         Attachments: main.cpp
>
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41242#action_41242 ] 

Timothy Bish commented on AMQCPP-166:
-------------------------------------

I've run the same tests in windows with a VC2005 build and again had no issues.

> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41240#action_41240 ] 

Timothy Bish commented on AMQCPP-166:
-------------------------------------

I added the following test to the integration suite in both trunk and in the 2.1.3 release code and it passes without error using the 5.0 broker.

void OpenwireSimpleTest::testMapMessageSend() {

    try {
        TestSupport testSupport(IntegrationCommon::getInstance().getOpenwireURL(), cms::Session::CLIENT_ACKNOWLEDGE );
        testSupport.initialize();

        if( IntegrationCommon::debug ) {
            cout << "Starting activemqcms test (sending "
                 << IntegrationCommon::defaultMsgCount
                 << " messages per type and sleeping "
                 << IntegrationCommon::defaultDelay
                 << " milli-seconds) ...\n"
                 << endl;
        }

        // Create CMS Object for Comms
        cms::Session* session = testSupport.getSession();
        cms::Queue* queue = session->createQueue( Guid::createGUIDString() );
        cms::MessageConsumer* consumer = session->createConsumer( queue );
        cms::MessageProducer* producer = session->createProducer( queue );

        unsigned char byteValue = 'A';
        char charValue = 'B';
        bool booleanValue = true;
        short shortValue = 2048;
        int intValue = 655369;
        long long longValue = 0xFFFFFFFF00000000ULL;
        float floatValue = 45.6545f;
        double doubleValue = 654564.654654;
        std::string stringValue = "The test string";

        cms::MapMessage* mapMessage = session->createMapMessage();

        mapMessage->setString( "stringKey", stringValue );
        mapMessage->setBoolean( "boolKey", booleanValue );
        mapMessage->setByte( "byteKey", byteValue );
        mapMessage->setChar( "charKey", charValue );
        mapMessage->setShort( "shortKey", shortValue );
        mapMessage->setInt( "intKey", intValue );
        mapMessage->setLong( "longKey", longValue );
        mapMessage->setFloat( "floatKey", floatValue );
        mapMessage->setDouble( "doubleKey", doubleValue );

        std::vector<unsigned char> bytes;
        bytes.push_back( 65 );
        bytes.push_back( 66 );
        bytes.push_back( 67 );
        bytes.push_back( 68 );
        bytes.push_back( 69 );
        mapMessage->setBytes( "bytesKey", bytes );

        // Send some text messages
        producer->send( mapMessage );

        delete mapMessage;

        cms::Message* message = consumer->receive( 1500 );
        CPPUNIT_ASSERT( message != NULL );

        cms::MapMessage* recvMapMessage = dynamic_cast<MapMessage*>( message );
        CPPUNIT_ASSERT( recvMapMessage != NULL );
        CPPUNIT_ASSERT( recvMapMessage->getString( "stringKey" ) == stringValue );
        CPPUNIT_ASSERT( recvMapMessage->getBoolean( "boolKey" ) == booleanValue );
        CPPUNIT_ASSERT( recvMapMessage->getByte( "byteKey" ) == byteValue );
        CPPUNIT_ASSERT( recvMapMessage->getChar( "charKey" ) == charValue );
        CPPUNIT_ASSERT( recvMapMessage->getShort( "shortKey" ) == shortValue );
        CPPUNIT_ASSERT( recvMapMessage->getInt( "intKey" ) == intValue );
        CPPUNIT_ASSERT( recvMapMessage->getLong( "longKey" ) == longValue );
        CPPUNIT_ASSERT( recvMapMessage->getFloat( "floatKey" ) == floatValue );
        CPPUNIT_ASSERT( recvMapMessage->getDouble( "doubleKey" ) == doubleValue );
        CPPUNIT_ASSERT( recvMapMessage->getBytes( "bytesKey" ) == bytes );

        delete message;

        if( IntegrationCommon::debug ) {
            printf("Shutting Down\n" );
        }

        delete producer;
        delete consumer;
        delete queue;
    }
    AMQ_CATCH_RETHROW( ActiveMQException )
}

> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "Thomas Johnson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Johnson reopened AMQCPP-166:
-----------------------------------


The message has to be sent to a topic for the test to fail.   Sorry I did not notice this yesterday.

> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41260#action_41260 ] 

Timothy Bish commented on AMQCPP-166:
-------------------------------------

I modified the integration test to use a topic and it still passes without issue.  About the only thing I can suggest is to submit a sample app that demonstrates the problem so I can see exactly what you are doing as there maybe some nuances in your usage that I'm not reproducing.

> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "Thomas Johnson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41243#action_41243 ] 

Thomas Johnson commented on AMQCPP-166:
---------------------------------------

I would agree.   I added the test and removed my workaround and the test passed.    Don't know why  modifying the example as stated and some other code I wrote did not work without the workaround.    

> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish closed AMQCPP-166.
-------------------------------

    Resolution: Cannot Reproduce

Added new integration test and ran on windows and linux and found no errors

> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "Thomas Johnson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41241#action_41241 ] 

Thomas Johnson commented on AMQCPP-166:
---------------------------------------

Interesting.   Wonder if something is wrong with my PC or build.    I found that the PrimitiveMap was not being copied when the message was being copied and added this quick workaround in ActiveMQMapMessage.h:

        virtual ActiveMQMapMessage* cloneDataStructure() const {
            ActiveMQMapMessage* message = new ActiveMQMapMessage();
            message->copyDataStructure( this );
			if (map!=NULL && message->map==NULL) {
				message->map=new util::PrimitiveMap(*map);
			}
            return message;
        }


> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (AMQCPP-166) MapMessage does not send mapped fields

Posted by "dj (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42270#action_42270 ] 

airover edited comment on AMQCPP-166 at 4/14/08 2:03 AM:
----------------------------------------------------

i have the same problem,who can tell me how to resolve this?thanks

      was (Author: airover):
    i have the same problem,who can tell me how to solve this?thanks
  
> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Timothy Bish
>             Fix For: 2.2
>
>         Attachments: main.cpp
>
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.