3 Replies Latest reply on Sep 21, 2011 3:31 PM by Sunny Zhao

    JMS: using Websphere MQ as JMS provider.

    Thorsten Schwarz Newbie

      Hello all,

      I try to connect a MDB to a Websphere MQ Queue.
      The WMQ resource adapter is deployed, the connection factory and the queues are bound to JNDI. I can use these objects to send messages to Websphere MQ from a stateless session bean.

      But I'm not able to connect a MDB to a WMQ queue. When deploying, I get a ClassCastException (see JBoss Output). I guess JBoss doesn't use the right resource adapter.

      So how can I specify a MDB's resource adapter?

      I found a documentation for specifing the resource adapter using SwiftMQ at http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/jca_inflow.html.
      But when I use the @ActivationConfigProperty(propertyName="resourceAdaptorName", propertyValue="wmq.jmsra.rar") annotation I get a new exception that says that the property resourceAdaptorName is not known (see second JBoss output).

      Can anybody tell me how to configure the MDB correctly???

      Thanks
      Thorsten




      My simple test MDB:

      package jmstest;
      
      import javax.ejb.ActivationConfigProperty;
      import javax.ejb.MessageDriven;
      import javax.jms.Message;
      import javax.jms.MessageListener;
      
      @MessageDriven(name = "ReceiverMDB", activationConfig = {
       @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/response.queue"),
       @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
       @ActivationConfigProperty(propertyName="messagingType", propertyValue="javax.jms.MessageListener")
      })
      public class MessageReceiver implements MessageListener {
      
       public void onMessage(Message arg0) {
       System.out.println("Message");
       }
      
      }



      JBoss Output (MDB without resource adapter annotation):
      13:43:38,498 INFO [Server] Starting JBoss (MX MicroKernel)...
      13:43:38,498 INFO [Server] Release ID: JBoss [Trinity] 4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)
      13:43:38,498 INFO [Server] Home Dir: D:\develop\appserver\jboss-4.2.1.GA
      13:43:38,498 INFO [Server] Home URL: file:/D:/develop/appserver/jboss-4.2.1.GA/
      13:43:38,498 INFO [Server] Patch URL: null
      13:43:38,498 INFO [Server] Server Name: default
      13:43:38,498 INFO [Server] Server Home Dir: D:\develop\appserver\jboss-4.2.1.GA\server\default
      13:43:38,498 INFO [Server] Server Home URL: file:/D:/develop/appserver/jboss-4.2.1.GA/server/default/
      13:43:38,498 INFO [Server] Server Log Dir: D:\develop\appserver\jboss-4.2.1.GA\server\default\log
      13:43:38,498 INFO [Server] Server Temp Dir: D:\develop\appserver\jboss-4.2.1.GA\server\default\tmp
      13:43:38,498 INFO [Server] Root Deployment Filename: jboss-service.xml
      13:43:38,716 INFO [ServerInfo] Java version: 1.5.0_12,Sun Microsystems Inc.
      13:43:38,716 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_12-b04,Sun Microsystems Inc.
      13:43:38,716 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
      13:43:39,279 INFO [Server] Core system initialized
      13:43:40,810 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
      13:43:40,810 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
      13:43:41,185 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
      13:43:41,185 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
      13:43:41,326 INFO [TransactionManagerService] Starting recovery manager
      13:43:41,404 INFO [TransactionManagerService] Recovery manager started
      13:43:41,404 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
      13:43:43,435 INFO [EJB3Deployer] Starting java:comp multiplexer
      13:43:44,701 INFO [ServiceEndpointManager] jbossws-1.2.1.GA (build=200704151756)
      13:43:45,685 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\develop\java\jdk1.5.0_12\bin;.;C:\WINDOWS\system32;C:\WINDOWS;D:\develop\java\jdk1.5.0_12\bin\..\jre\bin\client;D:\develop\java\jdk1.5.0_12\bin\..\jre\bin;D:\develop\java\jdk1.5.0_12\bin;C:\Programme\IBM\WebSphere MQ\Java\lib;D:\SQLApps\oracle\ora92\bin;C:\Programme\PuTTY;D:\develop\java\jdk1.6.0_01\jre\bin;C:\Programme\oracle92\jre\1.4.2\bin\client;C:\Programme\oracle92\bin;C:\Programme\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\IBM\WebSphere MQ\bin;C:\Programme\IBM\WebSphere MQ\tools\c\samples\bin
      13:43:45,748 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
      13:43:45,748 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
      13:43:45,748 INFO [Catalina] Initialization processed in 302 ms
      13:43:45,748 INFO [StandardService] Starting service jboss.web
      13:43:45,763 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.0.GA
      13:43:45,795 INFO [Catalina] Server startup in 43 ms
      13:43:45,888 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
      13:43:46,388 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
      13:43:46,529 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp19468jbossws-context-exp.war/
      13:43:46,607 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
      13:43:47,185 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
      13:43:47,576 INFO [MailService] Mail Service bound to java:/Mail
      13:43:47,685 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
      13:43:47,701 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
      13:43:47,732 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
      13:43:47,763 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
      13:43:47,795 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
      13:43:48,607 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/wmq.jmsra.rar
      13:43:48,841 ERROR [STDERR] WMQ Resource Adapter warning: MQJCA4005:Distributed transactions are not available in client mode.
      13:43:48,966 INFO [AdminObject] Bound admin object 'com.ibm.mq.connector.outbound.MQQueueProxy' at 'queue/request.queue'
      13:43:48,966 INFO [AdminObject] Bound admin object 'com.ibm.mq.connector.outbound.MQQueueProxy' at 'queue/response.queue'
      13:43:48,982 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
      13:43:48,998 INFO [QuartzResourceAdapter] start quartz!!!
      13:43:49,045 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
      13:43:49,076 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
      13:43:49,076 INFO [RAMJobStore] RAMJobStore initialized.
      13:43:49,076 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
      13:43:49,076 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
      13:43:49,076 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
      13:43:49,701 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
      13:43:49,888 INFO [A] Bound to JNDI name: queue/A
      13:43:49,888 INFO [B] Bound to JNDI name: queue/B
      13:43:49,888 INFO [C] Bound to JNDI name: queue/C
      13:43:49,888 INFO [D] Bound to JNDI name: queue/D
      13:43:49,888 INFO [ex] Bound to JNDI name: queue/ex
      13:43:49,904 INFO [testTopic] Bound to JNDI name: topic/testTopic
      13:43:49,904 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
      13:43:49,904 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
      13:43:49,904 INFO [testQueue] Bound to JNDI name: queue/testQueue
      13:43:49,935 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
      13:43:49,966 INFO [DLQ] Bound to JNDI name: queue/DLQ
      13:43:50,091 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
      13:43:50,107 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=cf/WMQ' to JNDI name 'java:cf/WMQ'
      13:43:51,388 INFO [TomcatDeployer] deploy, ctxPath=/JMSSenderService, warUrl=.../tmp/deploy/JMSTest2.jar-ws19502.war/
      13:43:51,498 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
      13:43:51,498 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=JMSTest2.jar,name=JMSSender,service=EJB3 with dependencies:
      13:43:51,638 INFO [EJBContainer] STARTED EJB: jmstest.JMSSender ejbName: JMSSender
      13:43:51,654 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.mdb.MDB
      13:43:51,654 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=JMSTest2.jar,name=ReceiverMDB,service=EJB3 with dependencies:
      13:43:51,654 INFO [EJBContainer] STARTED EJB: jmstest.MessageReceiver ejbName: ReceiverMDB
      13:43:51,685 INFO [EJB3Deployer] Deployed: file:/D:/develop/appserver/jboss-4.2.1.GA/server/default/deploy/JMSTest2.jar
      13:43:51,701 INFO [WSDLFilePublisher] WSDL published to: file:/D:/develop/appserver/jboss-4.2.1.GA/server/default/data/wsdl/JMSTest2.jar/JMSSenderService19500.wsdl
      13:43:51,717 INFO [ServiceEndpointManager] WebService started: http://127.0.0.1:8080/JMSSenderService/JMSSender
      13:43:51,748 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
      13:43:51,763 WARN [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@cc0f9f(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@8777c destination=queue/response.queue isTopic=false tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
      java.lang.ClassCastException: com.ibm.mq.jms.MQQueue
      at org.jboss.mq.SpyConnectionConsumer.(SpyConnectionConsumer.java:107)
      at org.jboss.mq.SpyConnection.createConnectionConsumer(SpyConnection.java:128)
      at org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool.setupConsumer(JmsServerSessionPool.java:262)
      at org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool.start(JmsServerSessionPool.java:91)
      at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupSessionPool(JmsActivation.java:536)
      at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:309)
      at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:585)
      at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
      at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
      at java.lang.Thread.run(Thread.java:595)
      13:43:51,951 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
      13:43:51,967 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
      13:43:51,982 INFO [Server] JBoss (MX MicroKernel) [4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)] Started in 13s:484ms


      JBoss Output (MDB with resource adapter annotation):
      4:13:54,246 INFO [EJBContainer] STARTED EJB: jmstest.MessageReceiver ejbName: ReceiverMDB
      14:13:54,262 WARN [ServiceController] Problem starting service jboss.j2ee:jar=JMSTest2.jar,name=ReceiverMDB,service=EJB3
      org.jboss.deployment.DeploymentException: Error for ActivationSpec class org.jboss.resource.adapter.jms.inflow.JmsActivationSpec as JavaBean; - nested throwable: (java.beans.IntrospectionException: No property found for: resourceAdaptorName on JavaBean: org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@11c0b76(ra=null destination=queue/response.queue isTopic=false tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5))
      at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
      at org.jboss.resource.deployment.ActivationSpecFactory.createActivationSpec(ActivationSpecFactory.java:135)
      at org.jboss.resource.deployment.RARDeployment.createActivationSpec(RARDeployment.java:254)
      at org.jboss.resource.deployment.RARDeployment.internalInvoke(RARDeployment.java:218)
      at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:156)
      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:44)
      at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:285)
      at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:189)
      at org.jboss.ejb3.mdb.MessagingContainer.startProxies(MessagingContainer.java:186)
      at org.jboss.ejb3.mdb.MessagingContainer.start(MessagingContainer.java:152)
      at org.jboss.ejb3.mdb.MDB.start(MDB.java:126)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy57.start(Unknown Source)
      at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
      at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:301)
      at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:362)
      at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy33.start(Unknown Source)
      at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
      at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
      at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
      at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy34.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy9.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
      at org.jboss.Main.boot(Main.java:200)
      at org.jboss.Main$1.run(Main.java:508)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.beans.IntrospectionException: No property found for: resourceAdaptorName on JavaBean: org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@11c0b76(ra=null destination=queue/response.queue isTopic=false tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
      at org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(PropertyEditors.java:350)
      at org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(PropertyEditors.java:281)
      at org.jboss.resource.deployment.ActivationSpecFactory.createActivationSpec(ActivationSpecFactory.java:129)
      ... 153 more
      14:13:54,277 INFO [EJB3Deployer] Deployed: file:/D:/develop/appserver/jboss-4.2.1.GA/server/default/deploy/JMSTest2.jar
      14:13:54,277 INFO [WSDLFilePublisher] WSDL published to: file:/D:/develop/appserver/jboss-4.2.1.GA/server/default/data/wsdl/JMSTest2.jar/JMSSenderService7676.wsdl
      14:13:54,293 INFO [ServiceEndpointManager] WebService started: http://127.0.0.1:8080/JMSSenderService/JMSSender
      14:13:54,309 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
      14:13:54,434 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.j2ee:jar=JMSTest2.jar,name=ReceiverMDB,service=EJB3
      State: FAILED
      Reason: org.jboss.deployment.DeploymentException: Error for ActivationSpec class org.jboss.resource.adapter.jms.inflow.JmsActivationSpec as JavaBean; - nested throwable: (java.beans.IntrospectionException: No property found for: resourceAdaptorName on JavaBean: org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@11c0b76(ra=null destination=queue/response.queue isTopic=false tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5))

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.j2ee:jar=JMSTest2.jar,name=ReceiverMDB,service=EJB3
      State: FAILED
      Reason: org.jboss.deployment.DeploymentException: Error for ActivationSpec class org.jboss.resource.adapter.jms.inflow.JmsActivationSpec as JavaBean; - nested throwable: (java.beans.IntrospectionException: No property found for: resourceAdaptorName on JavaBean: org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@11c0b76(ra=null destination=queue/response.queue isTopic=false tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5))


      [/url]

        • 1. Re: JMS: using Websphere MQ as JMS provider.
          Adam Mitchell Newbie

          I think that ClassCastException happens when the JBossMQ code pulls your IBM MQ class from JNDI. You're still using the JBoss MDB JMS Provider.

          I was in the same boat trying to use Sun's IMQ server. This is how I got it working:

          package elm.mdb;
          
          import javax.ejb.ActivationConfigProperty;
          import javax.ejb.MessageDriven;
          import javax.ejb.Remote;
          import javax.jms.Message;
          import javax.jms.MessageListener;
          import org.jboss.annotation.ejb.ResourceAdapter;
          
          import org.apache.log4j.Logger;
          
          @MessageDriven(mappedName = "jms/LoggingEventBean", activationConfig = {
           @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
           @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
           @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),
           @ActivationConfigProperty(propertyName = "clientId", propertyValue = "LoggingEventBean"),
           //@ActivationConfigProperty(propertyName = "destination", propertyValue = "elm_topics_LoggingEvent_default"),
           @ActivationConfigProperty(propertyName = "destination", propertyValue = "EnterpriseLoggingTopic"),
           @ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = "LoggingEventBean")
           //@ActivationConfigProperty(propertyName = "UserName", propertyValue = "guest"),
           //@ActivationConfigProperty(propertyName = "Password", propertyValue = "guest")
           })
           @ResourceAdapter("imqjmsra.rar")
          public class LoggingEventBean implements MessageListener {
          
           static Logger logger = Logger.getLogger(LoggingEventBean.class);
          
           public LoggingEventBean() {
           }
          
           public void onMessage(Message message) {
           logger.info("got message");
          
           }
          
          }
          


          I still don't know if this is the 'right' way to do it. Let me know if you find anything different!

          AM


          • 2. Re: JMS: using Websphere MQ as JMS provider.
            Siva Bodda Newbie

            Hi,
            I am getting the similar exception (stack trace) on recieving Message from MQ.
            i.e., ClassCastException on MQQueue
            If you have got the solution for this problem, please post me ur solution to shiva.boddapati@gmail.com

            Regards
            Shiva

            • 3. Re: JMS: using Websphere MQ as JMS provider.
              Sunny Zhao Newbie

              Got the same issue. This is my fix.

               

              Try to add this to jboss.xml

              <resource-adapter-name>wmq.jmsra.rar</resource-adapter-name>