You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Peter Pfort (JIRA)" <ji...@apache.org> on 2011/01/21 12:01:52 UTC

[jira] Created: (AMQCPP-346) No UTF8 conversation in OpenWire strings

No UTF8 conversation in OpenWire strings
----------------------------------------

                 Key: AMQCPP-346
                 URL: https://issues.apache.org/jira/browse/AMQCPP-346
             Project: ActiveMQ C++ Client
          Issue Type: Bug
    Affects Versions: 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2.0, 3.1.3
         Environment: Windows XP/VISTA/7
            Reporter: Peter Pfort
            Assignee: Timothy Bish


Hello,

I have found a bug in the implementation of the OpenWire protocol. When you have non ascii character i.e. in the selector of a topic consumer, then the program hangs in createConsumer.

The problem is in the class BaseDataStreamMarshaller. In BaseDataStreamMarshaller::tightMarshalString1() thinks, the string will be converted to UTF8, but BaseDataStreamMarshaller::tightMarshalString2() write out the string with dataOut->writeChars( value );

I have changed BaseDataStreamMarshaller::tightMarshalString2() to dataOut->writeUTF( value ); and everything works fine.

Please correct it in the source.

Best regards

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


[jira] Commented: (AMQCPP-346) No UTF8 conversation in OpenWire strings

Posted by "Peter Pfort (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQCPP-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984745#action_12984745 ] 

Peter Pfort commented on AMQCPP-346:
------------------------------------

Try 

int _tmain(int argc, _TCHAR* argv[])
{
   activemq::library::ActiveMQCPP::initializeLibrary();

   // Create a ConnectionFactory
   ConnectionFactory* connectionFactory =
      ConnectionFactory::createCMSConnectionFactory("tcp://xxxxx:61616?wireFormat=openwire&wireFormat.MaxInactivityDuration=120000");

   // Create a Connection
   Connection * connection = connectionFactory->createConnection("default", "", "yyyyy");
   delete connectionFactory;
   //connection->setClientId(clientId);
   connection->start();

   // Create a Session
   Session * session = connection->createSession( Session::AUTO_ACKNOWLEDGE);

   Topic *t = session->createTopic( "MYTOPIC" );
   MessageConsumer * consumer = session->createDurableConsumer( t, "xxxxx", "äUserName = 'Germanä'");

	return 0;
}


> No UTF8 conversation in OpenWire strings
> ----------------------------------------
>
>                 Key: AMQCPP-346
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-346
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.1.3, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4
>         Environment: Windows XP/VISTA/7
>            Reporter: Peter Pfort
>            Assignee: Timothy Bish
>
> Hello,
> I have found a bug in the implementation of the OpenWire protocol. When you have non ascii character i.e. in the selector of a topic consumer, then the program hangs in createConsumer.
> The problem is in the class BaseDataStreamMarshaller. In BaseDataStreamMarshaller::tightMarshalString1() thinks, the string will be converted to UTF8, but BaseDataStreamMarshaller::tightMarshalString2() write out the string with dataOut->writeChars( value );
> I have changed BaseDataStreamMarshaller::tightMarshalString2() to dataOut->writeUTF( value ); and everything works fine.
> Please correct it in the source.
> Best regards

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


[jira] Resolved: (AMQCPP-346) No UTF8 conversation in OpenWire strings

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

Timothy Bish resolved AMQCPP-346.
---------------------------------

    Resolution: Fixed

Fixed in trunk.

> No UTF8 conversation in OpenWire strings
> ----------------------------------------
>
>                 Key: AMQCPP-346
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-346
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.1.3, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4
>         Environment: Windows XP/VISTA/7
>            Reporter: Peter Pfort
>            Assignee: Timothy Bish
>
> Hello,
> I have found a bug in the implementation of the OpenWire protocol. When you have non ascii character i.e. in the selector of a topic consumer, then the program hangs in createConsumer.
> The problem is in the class BaseDataStreamMarshaller. In BaseDataStreamMarshaller::tightMarshalString1() thinks, the string will be converted to UTF8, but BaseDataStreamMarshaller::tightMarshalString2() write out the string with dataOut->writeChars( value );
> I have changed BaseDataStreamMarshaller::tightMarshalString2() to dataOut->writeUTF( value ); and everything works fine.
> Please correct it in the source.
> Best regards

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


[jira] Commented: (AMQCPP-346) No UTF8 conversation in OpenWire strings

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

Timothy Bish commented on AMQCPP-346:
-------------------------------------

Can you add a test case that demonstrates the issue.

> No UTF8 conversation in OpenWire strings
> ----------------------------------------
>
>                 Key: AMQCPP-346
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-346
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.1.3, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4
>         Environment: Windows XP/VISTA/7
>            Reporter: Peter Pfort
>            Assignee: Timothy Bish
>
> Hello,
> I have found a bug in the implementation of the OpenWire protocol. When you have non ascii character i.e. in the selector of a topic consumer, then the program hangs in createConsumer.
> The problem is in the class BaseDataStreamMarshaller. In BaseDataStreamMarshaller::tightMarshalString1() thinks, the string will be converted to UTF8, but BaseDataStreamMarshaller::tightMarshalString2() write out the string with dataOut->writeChars( value );
> I have changed BaseDataStreamMarshaller::tightMarshalString2() to dataOut->writeUTF( value ); and everything works fine.
> Please correct it in the source.
> Best regards

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


[jira] Updated: (AMQCPP-346) No UTF8 conversation in OpenWire strings

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

Peter Pfort updated AMQCPP-346:
-------------------------------

    Component/s: CMS Impl

> No UTF8 conversation in OpenWire strings
> ----------------------------------------
>
>                 Key: AMQCPP-346
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-346
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.1.3, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4
>         Environment: Windows XP/VISTA/7
>            Reporter: Peter Pfort
>            Assignee: Timothy Bish
>
> Hello,
> I have found a bug in the implementation of the OpenWire protocol. When you have non ascii character i.e. in the selector of a topic consumer, then the program hangs in createConsumer.
> The problem is in the class BaseDataStreamMarshaller. In BaseDataStreamMarshaller::tightMarshalString1() thinks, the string will be converted to UTF8, but BaseDataStreamMarshaller::tightMarshalString2() write out the string with dataOut->writeChars( value );
> I have changed BaseDataStreamMarshaller::tightMarshalString2() to dataOut->writeUTF( value ); and everything works fine.
> Please correct it in the source.
> Best regards

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