Bug 503526

Summary: JMSMessageID is not recognized when using selectors
Product: Red Hat Enterprise MRG Reporter: Rajith Attapattu <rattapat+nobody>
Component: qpid-javaAssignee: Rajith Attapattu <rattapat+nobody>
Status: CLOSED ERRATA QA Contact: Jan Sarenik <jsarenik>
Severity: medium Docs Contact:
Priority: high    
Version: 1.1.1CC: cctrieloff, freznice, gsim, iboverma, jsarenik, rafaels
Target Milestone: 1.1.2   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-12 17:39:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to address issue highlighted in the bz
none
Patch containing the fix and a test case none

Description Rajith Attapattu 2009-06-01 15:12:56 UTC
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 15:15:37 UTC
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 15:19:13 UTC
Hello Rajith,
could you possibly specify how to test, please?
Putting NEEDINFO.

Comment 3 Rajith Attapattu 2009-06-03 03:52:12 UTC
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-03 03:52:34 UTC
The updated RPMS will be built shortly.

Comment 5 Jan Sarenik 2009-06-03 14:44:06 UTC
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 14:53:18 UTC
Try adding -Dqpid.svnversion=exported to the ant command line.

Comment 7 Jan Sarenik 2009-06-08 09:15:40 UTC
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 12:39:32 UTC
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 07:43:47 UTC
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 08:29:16 UTC
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 17:39:26 UTC
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