1 Reply Latest reply on Jul 19, 2016 9:29 AM by Miroslav Novak

    Migrating to JBOSS 6.4.8 EAP - JMS - IBM MQ 7.5 - MDP deployment issue

    Manikandan Chandran Newbie

      I am trying to migrate my MDP from JBoss 5.0.0 to Jboss EAP 6.4.8. My application uses Spring JMS 3.1.1 and IBM MQ. Below is my resource adapter configuration

       

       

      <resource-adapter id="wmq.jmsra.rar">

        <archive>wmq.jmsra.rar</archive>

        <transaction-support>NoTransaction</transaction-support>

        <connection-definitions>

        <connection-definition class-name="com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl" jndi-name="java:jboss/jms/LGW1MQCF" enabled="true" use-java-context="true" pool-name="LGW1MQCF" use-ccm="true">

        <config-property name="port">2660</config-property>

        <config-property name="hostName">10.XX.XX.XX</config-property>

        <config-property name="username">MqAdmin</config-property>

        <config-property name="channel">LGW1.DV_SRV_CONN</config-property>

        <config-property name="transportType">CLIENT</config-property>

        <config-property name="queueManager">QM_LGW1_DEV</config-property>

        <pool>

             <min-pool-size>0</min-pool-size>

             <max-pool-size>20</max-pool-size>

             <flush-strategy>FailingConnectionOnly</flush-strategy>

        </pool>

        <security>

        <application/>

        </security>

        <timeout>

             <idle-timeout-minutes>1</idle-timeout-minutes>

        </timeout>

        </connection-definition>

             </connection-definitions>

           <admin-objects>

        <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:jboss/jms/queue/QUE_IN" enabled="true" pool-name="QUE_IN">

             <config-property name="baseQueueManagerName">QM_LGW1_DEV</config-property>

             <config-property name="baseQueueName">QUE_IN</config-property>

        </admin-object>

             </admin-objects>

        </resource-adapter>

        </resource-adapters>

       

      When I deploy my MDP, I get the below error. My guess is the my application is not seeing the wmq.jmsra.rar connection factory. The below error does not occur all the time. It occurs randomly .

       

      13:06:49,611 ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 67) Context initialization failed: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [myApp.mdp], from group with resource name [classpath*:/myApp/mdp/beanRefContext.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myApp.mdp' defined in URL [vfs:/C:/jbossStudio9/runtimes/jboss-eap-6.4.8/bin/content/myapp-ea-2.0.0.ear/myapp-2.0.0.war/WEB-INF/classes/myApp/mdp/beanRefContext.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myAppConnectionFactory' defined in class path resource [myApp/mdp/MyAppJmsContext.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Error looking up jms/LGW1MQCF, service service jboss.naming.context.java.jboss.jms.LGW1MQCF is not started

      at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:404) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.web.context.ContextLoader.loadParentContext(ContextLoader.java:558) [spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:303) [spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.5.16.Final-redhat-1.jar:7.5.16.Final-redhat-1]

      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3780) [jbossweb-7.5.16.Final-redhat-1.jar:7.5.16.Final-redhat-1]

      at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.8.Final-redhat-2.jar:7.5.8.Final-redhat-2]

      at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.8.Final-redhat-2.jar:7.5.8.Final-redhat-2]

      at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.8.Final-redhat-2.jar:7.5.8.Final-redhat-2]

      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_67]

      at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_67]

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]

      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]

      at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myApp.mdp' defined in URL [vfs:/C:/jbossStudio9/runtimes/jboss-eap-6.4.8/bin/content/myapp-ea-2.0.0.ear/myapp-2.0.0.war/WEB-INF/classes/myApp/mdp/beanRefContext.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myAppConnectionFactory' defined in class path resource [myApp/mdp/MyAppJmsContext.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Error looking up jms/LGW1MQCF, service service jboss.naming.context.java.jboss.jms.LGW1MQCF is not started

      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:275) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1139) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:962) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:396) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      ... 14 more

      Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myAppConnectionFactory' defined in class path resource [myApp/mdp/MyAppJmsContext.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Error looking up jms/LGW1MQCF, service service jboss.naming.context.java.jboss.jms.LGW1MQCF is not started

      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:267) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      ... 24 more

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myAppConnectionFactory' defined in class path resource [myApp/mdp/MyAppJmsContext.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Error looking up jms/LGW1MQCF, service service jboss.naming.context.java.jboss.jms.LGW1MQCF is not started

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:736) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_67]

      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_67]

      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_67]

      at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_67]

      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      ... 26 more

      Caused by: javax.naming.NameNotFoundException: Error looking up jms/LGW1MQCF, service service jboss.naming.context.java.jboss.jms.LGW1MQCF is not started

      at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:133)

      at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:81)

      at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:197)

      at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:174)

      at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:245)

      at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:183)

      at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)

      at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_67]

      at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_67]

      at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:155) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:179) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:106) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:231) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:217) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1633) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

      ... 42 more

       

       

       

       

       

      Please help??

       

       

      Thanks

      Mani