Bug 1009818

Summary: QueueBrowser ClassCastException with TIBCO EMS
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jeff Mesnil <jmesnil>
Component: JCAAssignee: Jeff Mesnil <jmesnil>
Status: CLOSED NOTABUG QA Contact: Vladimir Rastseluev <vrastsel>
Severity: high Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.1.1CC: pslavice
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-26 12:37:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jeff Mesnil 2013-09-19 08:36:40 UTC
Description of problem:

In TCK6 com/sun/ts/tests/jms/ee/all/queuetests/QueueTests.java#queueBrowserMsgsRemainOnQueueTest, the test throws a ClassCastException:

[javatest.batch] 04:26:38,539 INFO  [stdout] (Thread-59) 09-19-2013 04:26:38:  SVR: Checking for 3 messages with QueueBrowser
[javatest.batch] 04:26:39,868 INFO  [stdout] (Thread-59) 09-19-2013 04:26:39:  SVR-ERROR: java.lang.ClassCastException: com.tibco.tibjms.TibjmsObjectMessage cannot be cast to javax.jms.TextMessage
[javatest.batch] 04:26:39,868 INFO  [stdout] (Thread-59)        at com.sun.ts.tests.jms.ee.all.queuetests.QueueTests.queueBrowserMsgsRemainOnQueueTest(QueueTests.java:705)
[javatest.batch] 04:26:39,869 INFO  [stdout] (Thread-59)        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[javatest.batch] 04:26:39,869 INFO  [stdout] (Thread-59)        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[javatest.batch] 04:26:39,869 INFO  [stdout] (Thread-59)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[javatest.batch] 04:26:39,869 INFO  [stdout] (Thread-59)        at java.lang.reflect.Method.invoke(Method.java:601)
[javatest.batch] 04:26:39,869 INFO  [stdout] (Thread-59)        at com.sun.ts.lib.harness.EETest.run(EETest.java:495)
[javatest.batch] 04:26:39,869 INFO  [stdout] (Thread-59)        at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:113)

The messages that are sent are TextMessages (instances of com.tibco.tibjms.TibjmsTextMessage) and the message received by the queue receiver with the message selector is correct (instance of com.tibco.tibjms.TibjmsTextMessage).

However, the messages received by the QueueBrowser does not have the same type (instances of com.tibco.tibjms.TibjmsObjectMessage) and the class cast to TextMessage fails.

The generic RA does not intervene in the QueueBrowser code and this issue looks to be located in TIBCO code.

How reproducible:

Always


Steps to Reproduce:
1. use the latest generic JMS RA from https://github.com/jms-ra/generic-jms-ra
2. setup TCK6 + TIBCO EMS
3. run the failing test:

   $TS_HOME/src/com/sun/ts/tests/jms/ee/all/queuetests$ ant runclient -Dtest.client=QueueTests -Dtest=queueBrowserMsgsRemainOnQueueTest_from_ejb

Actual results:

The test fails because of a ClassCastException.

Expected results:

The test must pass.


Additional info:

Comment 1 Jeff Mesnil 2013-09-26 12:37:49 UTC
the test is passing in the latest run... closing the bug.