Bug 736252 - TCK tests failing due to issues with JMS properties JMSXGroupID and JMSXGroupSeq
Summary: TCK tests failing due to issues with JMS properties JMSXGroupID and JMSXGroupSeq
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-jca
Version: 2.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: 2.1.2
: ---
Assignee: Weston M. Price
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On: 704566 738361
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-07 07:25 UTC by Jiri Pechanec
Modified: 2016-02-22 00:59 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Jiri Pechanec 2011-09-07 07:25:44 UTC
The following tests are failing in TCK JMS module

com.sun.ts.tests.jms.ee.all.queueproperty.QueuePropertyTests.msgPropertiesQTest_from_jsp
com.sun.ts.tests.jms.ee.all.queueproperty.QueuePropertyTests.msgPropertiesQTest_from_servlet

com.sun.ts.tests.jms.ee.all.topicproperty.TopicPropertyTests.msgJMSXPropertiesTopicTest_from_ejb
com.sun.ts.tests.jms.ee.all.topicproperty.TopicPropertyTests.msgJMSXPropertiesTopicTest_from_jsp
com.sun.ts.tests.jms.ee.all.topicproperty.TopicPropertyTests.msgJMSXPropertiesTopicTest_from_servlet
com.sun.ts.tests.jms.ee.all.topicproperty.TopicPropertyTests.msgPropertiesTopicTest_from_ejb
com.sun.ts.tests.jms.ee.all.topicproperty.TopicPropertyTests.msgPropertiesTopicTest_from_jsp
com.sun.ts.tests.jms.ee.all.topicproperty.TopicPropertyTests.msgPropertiesTopicTest_from_servlet

The exception thrown is
09-06-2011 19:05:07:  SVR-ERROR: java.util.NoSuchElementException
	at java.util.ArrayList$Itr.next(ArrayList.java:757)
	at java.util.Collections$2.nextElement(Collections.java:3606)
	at com.sun.ts.tests.jms.ee.all.queueproperty.QueuePropertyTests.msgPropertiesQTest(QueuePropertyTests.java:635)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at com.sun.ts.lib.harness.EETest.run(EETest.java:495)
	at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:112)
	at org.apache.jsp.jsp_005fvehicle_jsp.runTest(jsp_005fvehicle_jsp.java:31)
	at org.apache.jsp.jsp_005fvehicle_jsp._jspService(jsp_005fvehicle_jsp.java:149)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
	at java.lang.Thread.run(Thread.java:636)

The code in question is
                ConnectionMetaData  data = tool.getDefaultQueueConnection().getMetaData();
                Enumeration         cmd = data.getJMSXPropertyNames();
                String              propName;

                if (cmd == null) {
                    logMsg("Error: no JMSX property names were returned!");
                    logMsg("expected JMSXGroupID and JMSXGroupSeq at a miniumum");
                    pass = false;
                } else {
                    int iCount = 0;

                    do {
                        propName = (String) cmd.nextElement();
                        logTrace(propName);
                        if (propName.equals("JMSXGroupID") || propName.equals("JMSXGroupSeq")) {
                            iCount++;
                        }
                    } while (cmd.hasMoreElements());
                    if (iCount > 1) {
                        logTrace("Pass:");
                    } else {
                        logMsg("Error: Expected property names not returned");
                        pass = false;
                    }
                }

It is obvious that metadata return empty collection with property name. According to JMS specification
----
3.5.9
JMSXGroupID and JMSXGroupSeq are standard properties clients should use if
they want to group messages. All providers must support them.

----

I'd like also to highlight that msgPropertiesQTest_from_appclient and msgPropertiesQTest_from_ejb worked and provided property names
09-06-2011 13:04:47:  TRACE: JMS_AMQP_NULL
09-06-2011 13:04:47:  TRACE: JMS_QPID_DESTTYPE
09-06-2011 13:04:47:  TRACE: JMSXGroupID
09-06-2011 13:04:47:  TRACE: JMSXGroupSeq
09-06-2011 13:04:47:  TRACE: JMSXUserID

msgJMSXPropertiesTopicTest_from_appclient and msgPropertiesTopicTest_from_appclient also worked so the properties are missing only under certain circumstances

Comment 1 Weston M. Price 2011-09-08 19:05:33 UTC
Good catch. There looks like there may be a bug in the underlying JMS client when retrieving the property names.

Comment 2 Weston M. Price 2011-09-08 19:19:50 UTC
In talking with the JMS team, there is indeed a bug in the underlying JMS client:

https://bugzilla.redhat.com/show_bug.cgi?id=704566

The JMS client that is used by the adapter will have to be upgraded to unblock this issue.

Comment 3 Andrew Stitcher 2011-09-21 19:44:13 UTC
The qpid-java-jca-0.10-10 package is based on a version of the java client libraries that has this fixed.

Comment 4 Andrew Stitcher 2011-09-22 13:30:19 UTC
This has been fixed in package qpid-java-jca-0.10-10


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