Bug 503526 - JMSMessageID is not recognized when using selectors
JMSMessageID is not recognized when using selectors
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java (Show other bugs)
1.1.1
All Linux
high Severity medium
: 1.1.2
: ---
Assigned To: Rajith Attapattu
Jan Sarenik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-01 11:12 EDT by Rajith Attapattu
Modified: 2009-06-12 13:39 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-12 13:39:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to address issue highlighted in the bz (1.39 KB, text/plain)
2009-06-01 11:15 EDT, Rajith Attapattu
no flags Details
Patch containing the fix and a test case (3.73 KB, patch)
2009-06-02 23:52 EDT, Rajith Attapattu
no flags Details | Diff

  None (edit)
Description Rajith Attapattu 2009-06-01 11:12:56 EDT
If JMSMessageID is used in a selector it is not recognized as a standard JMS header leading to an incorrect evaluation of the selector.

Ex. The following selector should select all messages, but it evaluates to false due to the bug described above.

"JMSMessageID IS NOT NULL"
Comment 1 Rajith Attapattu 2009-06-01 11:15:37 EDT
Created attachment 346091 [details]
Patch to address issue highlighted in the bz

The patch adds JMSMessageID as a standard JMS header in PropertyExpression.java
Comment 2 Frantisek Reznicek 2009-06-01 11:19:13 EDT
Hello Rajith,
could you possibly specify how to test, please?
Putting NEEDINFO.
Comment 3 Rajith Attapattu 2009-06-02 23:52:12 EDT
Created attachment 346350 [details]
Patch containing the fix and a test case

You can test the fix using
ant build test -Dprofile=cpp -Dtest=SelectorTest

You could also create a standalone test case based on the SelectorTest to verify against the RPMS.
Comment 4 Rajith Attapattu 2009-06-02 23:52:34 EDT
The updated RPMS will be built shortly.
Comment 5 Jan Sarenik 2009-06-03 10:44:06 EDT
On qpid-trunk revision 781360 I get:

----------------------------------------------------------------------------
qpid/java$ ant build
...
BUILD FAILED
/root/qpid/java/build.xml:139: The following error occurred while executing this line:
/root/qpid/java/build.xml:54: The following error occurred while executing this line:
/root/qpid/java/common/build.xml:79: Property qpid.svnversion was circularly defined.

Total time: 1 second
----------------------------------------------------------------------------
Is that OK, Rajith? How can I fix it?

And I am not able to separate SelectorTest out of the tree.
Comment 6 Rafael H. Schloming 2009-06-03 10:53:18 EDT
Try adding -Dqpid.svnversion=exported to the ant command line.
Comment 7 Jan Sarenik 2009-06-08 05:15:40 EDT
My jasan.testprofile:
----------------------------
broker.version=0-10
broker=/usr/sbin/qpidd -p @PORT --data-dir ${build.data}/@PORT -t --auth no
test.excludesfile=${project.root}/ExcludeList ${project.root}/010ExcludeList
----------------------------

# ant build test -Dprofile=jasan -Dtest=SelectorTest -Dqpid.svnversion=exported

runs successfully even against qpidd-0.5.752581-5.el5 (1.1.1)
and I find it strange.
Comment 8 Jan Sarenik 2009-06-08 08:39:32 EDT
Hmm, because it uses JAR files form its trunk build.

Is there any way to force "ant test" to use exclusively JAR
files from /usr/share/jar (the RPM installed ones)?
Comment 9 Jan Sarenik 2009-06-09 03:43:47 EDT
Current status is that I will try to reproduce the bug on
  qpid-java-0.5.751061-2.el5.src.rpm (yes, source RPM)
and if it is positive, I will verify it on the latest one.

Another option is to separate SelectorTest, which I am not
able to do myself (I have tried that already).
Comment 10 Jan Sarenik 2009-06-09 04:29:16 EDT
I have verified it the above-written way using the source
RPMs. In 0.5.751061-2 I had to patch SelectorTest, but
not the PropertyExpression.java file so the test runs
as it should, but the error is still there.

For the second case I fully patched the 0.5.751061
with bz503526.patch (included in qpid-java-0.5.751061-7.el5.src.rpm)

I used following line to trigger the test in those trees:
ant build test -Dprofile=jasan -Dtest=SelectorTest -Dqpid.svnversion=exported

  * In half-patched 0.5.751061 tree
    BUILD FAILED
    ...: TEST SUITE FAILED

  * In patched 0.5.751061 tree
    BUILD SUCCESSFUL
Comment 12 errata-xmlrpc 2009-06-12 13:39:26 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1097.html

Note You need to log in before you can comment on or make changes to this bug.