You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Kay Stanke (JIRA)" <ji...@apache.org> on 2007/01/29 11:07:02 UTC

[jira] Created: (AMQ-1141) JMS to JMS Bridge fails if message was generated from activemq-cpp 1.0 client

JMS to JMS Bridge fails if message was generated from activemq-cpp 1.0 client
-----------------------------------------------------------------------------

                 Key: AMQ-1141
                 URL: https://issues.apache.org/activemq/browse/AMQ-1141
             Project: ActiveMQ
          Issue Type: Bug
          Components: Transport
    Affects Versions: 4.1.0
         Environment: Using Windows XP SP2, JDK 1.6.0, Bea Weblogic Server 8.1 SP6, ActiveMQ-CPP 1.0
            Reporter: Kay Stanke
         Attachments: activemq.xml

I'm using a jms to jms bridge from activemq to bea wls 8.1 My activemq version is a patched 4.1 with the fix for issue AMQ-1110 to decouple me from the release of activemq 4.2. 

As my producer is a cpp server program i downloaded and compiled activemq-cpp 1.0. I managed to make activemq-cpp compile and link as shared lib / dll under vc 7.1 (Visual Studio .NET 2003).  



By sending a textmessage to the activemq-queue releated to the jms bridge the message is not forwarded and i get the following stacktrace:

ERROR DestinationBridge              - failed to forward message on attempt: 1 
reason: weblogic.jms.common.MessageFormatException: Illegal property name, 'request-id' 
message: ActiveMQTextMessage {commandId = 3, responseRequired = false, 
messageId = ID:KStanke-2844-1170064566619-5:0:-1:1:1, 
originalDestination = null, 
originalTransactionId = null, 
producerId = ID:KStanke-2844-1170064566619-5:0:-1:1, 
destination = queue://TEST.FOO, 
transactionId = null, expiration = 0, 
timestamp = 1170064774288, 
arrival = 0, 
correlationId = null, 
replyTo = null, 
persistent = false, 
type = null, 
priority = 4, 
groupID = null, 
groupSequence = 0, targetConsumerId = null, compressed = false, 
userID = null, content = org.apache.activemq.util.ByteSequence@12f9924, 
marshalledProperties = org.apache.activemq.util.ByteSequence@1ef3212, dataStructure = null, 
redeliveryCounter = 0, size = 0, properties = {request-id=2}, readOnlyProperties = true, 
readOnlyBody = true, droppable = false, text = null}
weblogic.jms.common.MessageFormatException: Illegal property name, 'request-id'
at weblogic.jms.common.MessageImpl.setObjectProperty(MessageImpl.java:1032)
at weblogic.jms.common.MessageImpl.<init>(MessageImpl.java:281)
at weblogic.jms.common.TextMessageImpl.<init>(TextMessageImpl.java:47)
at weblogic.jms.common.TextMessageImpl.<init>(TextMessageImpl.java:39)
at weblogic.jms.client.JMSProducer.convertMessage(JMSProducer.java:558)
at weblogic.jms.client.JMSProducer.sendInternal(JMSProducer.java:331)
at weblogic.jms.client.JMSProducer.send(JMSProducer.java:152)
at weblogic.jms.client.JMSProducer.send(JMSProducer.java:215)
at org.apache.activemq.network.jms.QueueBridge.sendMessage(QueueBridge.java:87)
at org.apache.activemq.network.jms.DestinationBridge.onMessage(DestinationBridge.java:134)
at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:840)
at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:96)
at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:165)
at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:88)
at org.apache.activemq.thread.DedicatedTaskRunner.access$000(DedicatedTaskRunner.java:25)
at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:39)

This issue seems to be related to AMQ-748

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


[jira] Commented: (AMQ-1141) JMS to JMS Bridge fails if message was generated from activemq-cpp 1.0 client

Posted by "Kay Stanke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38439 ] 

Kay Stanke commented on AMQ-1141:
---------------------------------

The patch i applied was in file org.apache.activemq.command.ActiveMQTempDestination in the method setPhysicalName.

There was a number format exception raised as the string was not properly checked. Basically the patch is just some check against null and length of seqStr before parsing and catching of any NumberFormatException. 

I would think that this could not cause an unintended sending of a connect message. I am wondering if the request-id is  really only send for connect messages as i see it in any message going over the bridge even if i can validate that the message contains my own content. 

As i commented on AMQCPP-60 i patched 
 replace a line in copyStandardHeadersFromFrameToMessage from
msg.setJMSCorrelationID((String) headers.remove(Stomp.Headers.Send.CORRELATION_ID));
to
msg.setJMSCorrelationID((String) headers.remove(Stomp.Headers.Connect.REQUEST_ID));

in org.apache.activemq.transport.stomp.FrameTranslator.java (inner class helper). 

>From my understanding this class is relevant if messages have to be converted in and from the activemq format. 


> JMS to JMS Bridge fails if message was generated from activemq-cpp 1.0 client
> -----------------------------------------------------------------------------
>
>                 Key: AMQ-1141
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1141
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.1.0
>         Environment: Using Windows XP SP2, JDK 1.6.0, Bea Weblogic Server 8.1 SP6, ActiveMQ-CPP 1.0
>            Reporter: Kay Stanke
>         Attachments: activemq.xml
>
>
> I'm using a jms to jms bridge from activemq to bea wls 8.1 My activemq version is a patched 4.1 with the fix for issue AMQ-1110 to decouple me from the release of activemq 4.2. 
> As my producer is a cpp server program i downloaded and compiled activemq-cpp 1.0. I managed to make activemq-cpp compile and link as shared lib / dll under vc 7.1 (Visual Studio .NET 2003).  
> By sending a textmessage to the activemq-queue releated to the jms bridge the message is not forwarded and i get the following stacktrace:
> ERROR DestinationBridge              - failed to forward message on attempt: 1 
> reason: weblogic.jms.common.MessageFormatException: Illegal property name, 'request-id' 
> message: ActiveMQTextMessage {commandId = 3, responseRequired = false, 
> messageId = ID:KStanke-2844-1170064566619-5:0:-1:1:1, 
> originalDestination = null, 
> originalTransactionId = null, 
> producerId = ID:KStanke-2844-1170064566619-5:0:-1:1, 
> destination = queue://TEST.FOO, 
> transactionId = null, expiration = 0, 
> timestamp = 1170064774288, 
> arrival = 0, 
> correlationId = null, 
> replyTo = null, 
> persistent = false, 
> type = null, 
> priority = 4, 
> groupID = null, 
> groupSequence = 0, targetConsumerId = null, compressed = false, 
> userID = null, content = org.apache.activemq.util.ByteSequence@12f9924, 
> marshalledProperties = org.apache.activemq.util.ByteSequence@1ef3212, dataStructure = null, 
> redeliveryCounter = 0, size = 0, properties = {request-id=2}, readOnlyProperties = true, 
> readOnlyBody = true, droppable = false, text = null}
> weblogic.jms.common.MessageFormatException: Illegal property name, 'request-id'
> at weblogic.jms.common.MessageImpl.setObjectProperty(MessageImpl.java:1032)
> at weblogic.jms.common.MessageImpl.<init>(MessageImpl.java:281)
> at weblogic.jms.common.TextMessageImpl.<init>(TextMessageImpl.java:47)
> at weblogic.jms.common.TextMessageImpl.<init>(TextMessageImpl.java:39)
> at weblogic.jms.client.JMSProducer.convertMessage(JMSProducer.java:558)
> at weblogic.jms.client.JMSProducer.sendInternal(JMSProducer.java:331)
> at weblogic.jms.client.JMSProducer.send(JMSProducer.java:152)
> at weblogic.jms.client.JMSProducer.send(JMSProducer.java:215)
> at org.apache.activemq.network.jms.QueueBridge.sendMessage(QueueBridge.java:87)
> at org.apache.activemq.network.jms.DestinationBridge.onMessage(DestinationBridge.java:134)
> at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:840)
> at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:96)
> at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:165)
> at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:88)
> at org.apache.activemq.thread.DedicatedTaskRunner.access$000(DedicatedTaskRunner.java:25)
> at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:39)
> This issue seems to be related to AMQ-748

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


[jira] Commented: (AMQ-1141) JMS to JMS Bridge fails if message was generated from activemq-cpp 1.0 client

Posted by "Nathan Mittler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38435 ] 

Nathan Mittler commented on AMQ-1141:
-------------------------------------

the request-id field was added to support doing support the connect/connected stomp handshake with the broker.  It was not intended to be forwarded to any JMS entity.  Is it possible that your patch somehow forwards the stomp messages that contain the request-id property? (it would only be the connect message).

> JMS to JMS Bridge fails if message was generated from activemq-cpp 1.0 client
> -----------------------------------------------------------------------------
>
>                 Key: AMQ-1141
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1141
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 4.1.0
>         Environment: Using Windows XP SP2, JDK 1.6.0, Bea Weblogic Server 8.1 SP6, ActiveMQ-CPP 1.0
>            Reporter: Kay Stanke
>         Attachments: activemq.xml
>
>
> I'm using a jms to jms bridge from activemq to bea wls 8.1 My activemq version is a patched 4.1 with the fix for issue AMQ-1110 to decouple me from the release of activemq 4.2. 
> As my producer is a cpp server program i downloaded and compiled activemq-cpp 1.0. I managed to make activemq-cpp compile and link as shared lib / dll under vc 7.1 (Visual Studio .NET 2003).  
> By sending a textmessage to the activemq-queue releated to the jms bridge the message is not forwarded and i get the following stacktrace:
> ERROR DestinationBridge              - failed to forward message on attempt: 1 
> reason: weblogic.jms.common.MessageFormatException: Illegal property name, 'request-id' 
> message: ActiveMQTextMessage {commandId = 3, responseRequired = false, 
> messageId = ID:KStanke-2844-1170064566619-5:0:-1:1:1, 
> originalDestination = null, 
> originalTransactionId = null, 
> producerId = ID:KStanke-2844-1170064566619-5:0:-1:1, 
> destination = queue://TEST.FOO, 
> transactionId = null, expiration = 0, 
> timestamp = 1170064774288, 
> arrival = 0, 
> correlationId = null, 
> replyTo = null, 
> persistent = false, 
> type = null, 
> priority = 4, 
> groupID = null, 
> groupSequence = 0, targetConsumerId = null, compressed = false, 
> userID = null, content = org.apache.activemq.util.ByteSequence@12f9924, 
> marshalledProperties = org.apache.activemq.util.ByteSequence@1ef3212, dataStructure = null, 
> redeliveryCounter = 0, size = 0, properties = {request-id=2}, readOnlyProperties = true, 
> readOnlyBody = true, droppable = false, text = null}
> weblogic.jms.common.MessageFormatException: Illegal property name, 'request-id'
> at weblogic.jms.common.MessageImpl.setObjectProperty(MessageImpl.java:1032)
> at weblogic.jms.common.MessageImpl.<init>(MessageImpl.java:281)
> at weblogic.jms.common.TextMessageImpl.<init>(TextMessageImpl.java:47)
> at weblogic.jms.common.TextMessageImpl.<init>(TextMessageImpl.java:39)
> at weblogic.jms.client.JMSProducer.convertMessage(JMSProducer.java:558)
> at weblogic.jms.client.JMSProducer.sendInternal(JMSProducer.java:331)
> at weblogic.jms.client.JMSProducer.send(JMSProducer.java:152)
> at weblogic.jms.client.JMSProducer.send(JMSProducer.java:215)
> at org.apache.activemq.network.jms.QueueBridge.sendMessage(QueueBridge.java:87)
> at org.apache.activemq.network.jms.DestinationBridge.onMessage(DestinationBridge.java:134)
> at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:840)
> at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:96)
> at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:165)
> at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:88)
> at org.apache.activemq.thread.DedicatedTaskRunner.access$000(DedicatedTaskRunner.java:25)
> at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:39)
> This issue seems to be related to AMQ-748

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