Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-14642

[IBM MQ 8/9 RA] TCK7 - ClassCastException: com.ibm.mq.connector.outbound.MQQueueProxy cannot be cast to com.ibm.mq.jms.MQDestination during send

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Critical
    • None
    • 7.2.0.CD12, 7.2.0.CD14
    • WebSphereMQ RA
    • None

    Description

      Some of TCK 7 tests are failing because of

      SVR-ERROR: Expected JMSException, received com.ibm.mq.connector.outbound.MQQueueProxy cannot be cast to com.ibm.mq.jms.MQDestination
      

      The full stack trace shows that this issue in IBM 9 resource adapter in com.ibm.mq.jms.MQMessageProducer.send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener) line 565:

      [javatest.batch] 06:39:27,209 INFO  [stdout] (Thread-56) 04-19-2018 06:39:27:  SVR: Calling MessageProducer.send(Destination, Message, -1, Message.DEFAULT_PRIORITY, 0L, CompletionListener)
      [javatest.batch] 06:39:27,210 INFO  [stdout] (Thread-56) 04-19-2018 06:39:27:  SVR: MyCompletionListener()
      [javatest.batch] 06:39:27,211 INFO  [stdout] (Thread-56) 04-19-2018 06:39:27:  SVR-ERROR: Expected JMSException, received com.ibm.mq.connector.outbound.MQQueueProxy cannot be cast to com.ibm.mq.jms.MQDestination
      [javatest.batch] 06:39:27,214 INFO  [stdout] (Thread-56) 04-19-2018 06:39:27:  SVR-ERROR: java.lang.ClassCastException: com.ibm.mq.connector.outbound.MQQueueProxy cannot be cast to com.ibm.mq.jms.MQDestination
      [javatest.batch] 06:39:27,214 INFO  [stdout] (Thread-56) 	at com.ibm.mq.jms.MQMessageProducer.send(MQMessageProducer.java:565)
      [javatest.batch] 06:39:27,215 INFO  [stdout] (Thread-56) 	at com.ibm.mq.connector.outbound.MessageProducerWrapper.send(MessageProducerWrapper.java:589)
      [javatest.batch] 06:39:27,215 INFO  [stdout] (Thread-56) 	at com.sun.ts.tests.jms.core20.messageproducertests.Client.JMSExceptionTests(Client.java:1965)
      [javatest.batch] 06:39:27,215 INFO  [stdout] (Thread-56) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javatest.batch] 06:39:27,216 INFO  [stdout] (Thread-56) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [javatest.batch] 06:39:27,216 INFO  [stdout] (Thread-56) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [javatest.batch] 06:39:27,217 INFO  [stdout] (Thread-56) 	at java.lang.reflect.Method.invoke(Method.java:498)
      [javatest.batch] 06:39:27,217 INFO  [stdout] (Thread-56) 	at com.sun.ts.lib.harness.EETest.run(EETest.java:550)
      [javatest.batch] 06:39:27,217 INFO  [stdout] (Thread-56) 	at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:113)
      [javatest.batch] 06:39:27,218 INFO  [stdout] (Thread-56) 	at com.sun.ts.tests.common.vehicle.ejb.EJBVehicle.runTest(EJBVehicle.java:70)
      [javatest.batch] 06:39:27,218 INFO  [stdout] (Thread-56) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javatest.batch] 06:39:27,218 INFO  [stdout] (Thread-56) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [javatest.batch] 06:39:27,219 INFO  [stdout] (Thread-56) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [javatest.batch] 06:39:27,219 INFO  [stdout] (Thread-56) 	at java.lang.reflect.Method.invoke(Method.java:498)
      [javatest.batch] 06:39:27,219 INFO  [stdout] (Thread-56) 	at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
      [javatest.batch] 06:39:27,220 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,220 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      [javatest.batch] 06:39:27,220 INFO  [stdout] (Thread-56) 	at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90)
      [javatest.batch] 06:39:27,221 INFO  [stdout] (Thread-56) 	at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101)
      [javatest.batch] 06:39:27,221 INFO  [stdout] (Thread-56) 	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
      [javatest.batch] 06:39:27,221 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,221 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
      [javatest.batch] 06:39:27,221 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,221 INFO  [stdout] (Thread-56) 	at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
      [javatest.batch] 06:39:27,221 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,222 INFO  [stdout] (Thread-56) 	at org.jboss.as.jpa.interceptor.SFSBInvocationInterceptor.processInvocation(SFSBInvocationInterceptor.java:57)
      [javatest.batch] 06:39:27,222 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,222 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.tx.StatefulBMTInterceptor.handleInvocation(StatefulBMTInterceptor.java:94)
      [javatest.batch] 06:39:27,222 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.tx.BMTInterceptor.processInvocation(BMTInterceptor.java:58)
      [javatest.batch] 06:39:27,222 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,222 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor.processInvocation(StatefulSessionSynchronizationInterceptor.java:135)
      [javatest.batch] 06:39:27,222 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,222 INFO  [stdout] (Thread-56) 	at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
      [javatest.batch] 06:39:27,222 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,223 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:40)
      [javatest.batch] 06:39:27,223 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,223 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      [javatest.batch] 06:39:27,223 INFO  [stdout] (Thread-56) 	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
      [javatest.batch] 06:39:27,223 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,223 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:59)
      [javatest.batch] 06:39:27,223 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,223 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      [javatest.batch] 06:39:27,223 INFO  [stdout] (Thread-56) 	at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81)
      [javatest.batch] 06:39:27,224 INFO  [stdout] (Thread-56) 	at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
      [javatest.batch] 06:39:27,224 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,224 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:89)
      [javatest.batch] 06:39:27,224 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,224 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
      [javatest.batch] 06:39:27,224 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,224 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
      [javatest.batch] 06:39:27,224 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,224 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
      [javatest.batch] 06:39:27,224 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,225 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
      [javatest.batch] 06:39:27,225 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,225 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
      [javatest.batch] 06:39:27,225 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,225 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
      [javatest.batch] 06:39:27,225 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,225 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$1.processInvocation(EjbExceptionTransformingInterceptorFactories.java:80)
      [javatest.batch] 06:39:27,225 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,235 INFO  [stdout] (Thread-56) 	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
      [javatest.batch] 06:39:27,235 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,236 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
      [javatest.batch] 06:39:27,236 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,236 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
      [javatest.batch] 06:39:27,236 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,236 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438)
      [javatest.batch] 06:39:27,236 INFO  [stdout] (Thread-56) 	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:619)
      [javatest.batch] 06:39:27,236 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)
      [javatest.batch] 06:39:27,236 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      [javatest.batch] 06:39:27,236 INFO  [stdout] (Thread-56) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      [javatest.batch] 06:39:27,236 INFO  [stdout] (Thread-56) 	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
      [javatest.batch] 06:39:27,236 INFO  [stdout] (Thread-56) 	at org.wildfly.security.auth.server.SecurityIdentity.runAsFunctionEx(SecurityIdentity.java:380)
      [javatest.batch] 06:39:27,236 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.remote.AssociationImpl.invokeWithIdentity(AssociationImpl.java:541)
      [javatest.batch] 06:39:27,237 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.remote.AssociationImpl.invokeMethod(AssociationImpl.java:536)
      [javatest.batch] 06:39:27,237 INFO  [stdout] (Thread-56) 	at org.jboss.as.ejb3.remote.AssociationImpl.lambda$receiveInvocationRequest$0(AssociationImpl.java:194)
      [javatest.batch] 06:39:27,237 INFO  [stdout] (Thread-56) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      [javatest.batch] 06:39:27,237 INFO  [stdout] (Thread-56) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      [javatest.batch] 06:39:27,237 INFO  [stdout] (Thread-56) 	at java.lang.Thread.run(Thread.java:748)
      [javatest.batch] 06:39:27,237 INFO  [stdout] (Thread-56) 	at org.jboss.threads.JBossThread.run(JBossThread.java:485)
      

      I've decompiled IBM MQ 9 RA and problem is in:

      /*     */   public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener)
      /*     */     throws JMSException, MessageFormatException, InvalidDestinationException, IllegalArgumentException, UnsupportedOperationException
      /*     */   {
      /* 558 */     if (Trace.isOn) {
      /* 559 */       Trace.entry(this, "com.ibm.mq.jms.MQMessageProducer", "send(Destination,Message,int,int,long,CompletionListener)", new Object[] { destination, message, 
      /*     */       
      /* 561 */         Integer.valueOf(deliveryMode), Integer.valueOf(priority), Long.valueOf(timeToLive), completionListener });
      /*     */     }
      /*     */     
      /*     */ 
      problematic line ->> /* 565 */     JmsDestination dest = destination == null ? null : (JmsDestination)((MQDestination)destination).validateDestination();
      /* 566 */     Message msg = message;
      /* 567 */     if ((message instanceof JMSMessage))
      /*     */     {
      

      Looking into the code this problematic class cast conversion is also in MQMessageProducer.send(Destination destination, Message message).

      TCK 7 tests faling because of this issue:

      [javatest.batch] FAILED........com/sun/ts/tests/jms/core20/messageproducertests/Client.java#JMSExceptionTests_from_ejb
      [javatest.batch] FAILED........com/sun/ts/tests/jms/core20/messageproducertests/Client.java#JMSExceptionTests_from_jsp
      [javatest.batch] FAILED........com/sun/ts/tests/jms/core20/messageproducertests/Client.java#JMSExceptionTests_from_servlet
      

      Attachments

        Activity

          People

            jmesnil1@redhat.com Jeff Mesnil
            mnovak1@redhat.com Miroslav Novak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: