MQ连接在tomcat中的context.lookup期间抛出空指针

时间:2015-05-28 21:52:28

标签: jms jndi spring-jms initial-context

我正在尝试使用tomcat的context.xml中定义的JNDI查找连接到MQ。在启动应用程序时,我在FFDC中获得NamingException和NullPointer。以下是记录的内容。我无法弄清楚出了什么问题。有关如何调试此功能的任何说明都会有所帮助 MQ VERSION:

[tomcat@catlx0004 ~]$  /opt/mqm/bin/dspmqver -a
Name:        WebSphere MQ
Version:     7.0.1.12
CMVC level:  p701-112-140319
BuildType:   IKAP - (Production)
Platform:    WebSphere MQ for Linux (x86-64 platform)
Mode:        64-bit
O/S:         Linux 2.6.32-358.2.1.el6.x86_64

日志中的异常:

    FFDC called in uninitialized Trace module



                                        FDCTitle


    Product          :- ProductName
    Date/Time        :- Thu May 28 19:05:48 UTC 2015
    System time      :- 1432839948804
    Operating System :- Linux
    UserID           :- tomcat
    Java Vendor      :- Oracle Corporation
    Java Version     :- 24.45-b08

    Source Class     :- com.ibm.msg.client.commonservices.nls.PINLSServices
    Source Method    :- createException(String,HashMap)
    ProbeID          :- XC003001
    Thread           :- name=localhost-startStop-1 priority=5 group=main ccl=WebappClassLoader
      context: /CWL_UserSettings
      delegate: false
      repositories:
        /WEB-INF/classes/
    ----------> Parent Classloader:
    org.apache.catalina.loader.StandardClassLoader@7dc3d69c


                                          Data
                                          ----

    Data        :- none
    No Components Found


                                      Stack trace
                                      -----------

    Stack trace to show the location of the FFST call
    |   FFST Location  :-  java.lang.Exception
    |       at com.ibm.msg.client.commonservices.trace.Trace.getCurrentPosition(Trace.java:1854)
    |       at com.ibm.msg.client.commonservices.trace.Trace.createFFSTString(Trace.java:1793)
    |       at com.ibm.msg.client.commonservices.trace.Trace.ffstInternal(Trace.java:1674)
    |       at com.ibm.msg.client.commonservices.trace.Trace.ffst(Trace.java:1491)
    |       at com.ibm.msg.client.commonservices.nls.PINLSServices.createException(PINLSServices.java:115)
    |       at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:388)
    |       at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:104)
    |       at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:167)
    |       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    |       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    |       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    |       at java.lang.reflect.Method.invoke(Unknown Source)
    |       at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:183)
    |       at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3330)
    |       at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:275)
    |       at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:76)
    |       at com.ibm.mq.jms.MQQueueConnectionFactoryFactory.getObjectInstance(MQQueueConnectionFactoryFactory.java:73)
    |       at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java
    ..........
                                Property Store Contents
                                -----------------------

    All currently set properties
    |   EKMC_PROPERTY                                         :-  /apps/ekmc/devcell/devnode/tomcat/certs/ekmcconfig.dev.properties
    |   MQJMS_TRACE_DIR                                       :-
    |   MQJMS_TRACE_LEVEL                                     :-
    |   WXSGRIDNAME                                           :-  TARGET_SSA_DEV_GRID
    |   java.runtime.name                                     :-  Java(TM) SE Runtime Environment
    |   java.runtime.version                                  :-  1.7.0_45-b18
    |   java.security.egd                                     :-  file:/dev/./urandom
    |   java.specification.name                               :-  Java Platform API Specification
    |   java.specification.vendor                             :-  Oracle Corporation
    |   java.specification.version                            :-  1.7
    |   shared.loader                                         :-  ${catalina.home}/shared/*.jar,${catalina.home}/shared/EKMC/*.jar,${catalina.home}/shared/WXSClient/*.jar,${catalina.home}/shared/servlet/*.jar,/opt/mqm/java/lib/*.jar,/opt/mqm/java/lib/*.jar
    |   sun.boot.class.path                                   :-  /apps/install/tomcat7.59/shared/WXSClient/ibmorbapi.jar:/apps/install/tomcat7.59/shared/WXSClient/ibmcfw.jar:/apps/install/tomcat7.59/shared/WXSClient/ibmorb.jar:/apps/install/tomcat7.59/shared/WXSClient/ogclient.jar:/apps/install/java/jre1.7.0_45/lib/resources.jar:/apps/install/java/jre1.7.0_45/lib/rt.jar:/apps/install/java/jre1.7.0_45/lib/sunrsasign.jar:/apps/install/java/jre1.7.0_45/lib/jsse.jar:/apps/install/java/jre1.7.0_45/lib/jce.jar:/apps/install/java/jre1.7.0_45/lib/charsets.jar:/apps/install/java/jre1.7.0_45/lib/jfr.jar:/apps/install/java/jre1.7.0_45/classes
    ......

                                        FDCTitle


    Product          :- ProductName
    Date/Time        :- Thu May 28 19:05:48 UTC 2015
    System time      :- 1432839948830
    Operating System :- Linux
    UserID           :- tomcat
    Java Vendor      :- Oracle Corporation
    Java Version     :- 24.45-b08

    Source Class     :- JmsFactoryFactory
    Source Method    :- getIntance(int)
    ProbeID          :- XI001005
    Thread           :- name=localhost-startStop-1 priority=5 group=main ccl=WebappClassLoader
      context: /CWL_UserSettings
      delegate: false
      repositories:
        /WEB-INF/classes/
    ----------> Parent Classloader:
    org.apache.catalina.loader.StandardClassLoader@7dc3d69c


                                          Data
                                          ----

    |   connectionTypeName  :-  com.ibm.msg.client.wmq
    |   exception           :-  ExceptionDepth is 3
    |   exception           :-
    |   |   Cause:1       :-  java.lang.reflect.InvocationTargetException
    |   |   Cause:2       :-  java.lang.NullPointerException
    |   |   StackTrace:1  :-  java.lang.reflect.InvocationTargetException
    |   |           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    |   |           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    |   |           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    |   |           at java.lang.reflect.Method.invoke(Unknown Source)
    |   |           at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:183)
    |   |           at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3330)
    |   |           at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:275)
    |   |           at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:76)
    |   |           at com.ibm.mq.jms.MQQueueConnectionFactoryFactory.getObjectInstance(MQQueueConnectionFactoryFactory.java:73)
    |   |           at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)
    |   |           at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
    |   |           at org.apache.naming.NamingContext.lookup(NamingContext.java:842)
    |   |           at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
    |   |           at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
    |   |           at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
    |   |           at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
    |   |           at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
    |   |           at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
    |   |           at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
    |   |           at org.apache.naming.SelectorContext.lookup(SelectorContext.java:156)
    |   |           at javax.naming.InitialContext.lookup(Unknown Source)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig.mqQueueConnectionFactory(MessagingConfig.java:41)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig$$EnhancerBySpringCGLIB$$c5afe578.CGLIB$mqQueueConnectionFactory$1(<generated>)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig$$EnhancerBySpringCGLIB$$c5afe578$$FastClassBySpringCGLIB$$99d29d2a.invoke(<generated>)
    |   |           at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    |   |           at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig$$EnhancerBySpringCGLIB$$c5afe578.mqQueueConnectionFactory(<generated>)
    |   |           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    |   |           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    |   |           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    |   |           at java.lang.reflect.Method.invoke(Unknown Source)
    |   |           at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    |   |           at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
    |   |           at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
    |   |           at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    |   |           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
    |   |           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    |   |           at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:322)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig$$EnhancerBySpringCGLIB$$c5afe578.mqQueueConnectionFactory(<generated>)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig.userConnectionFactory(MessagingConfig.java:57)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig$$EnhancerBySpringCGLIB$$c5afe578.CGLIB$userConnectionFactory$0(<generated>)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig$$EnhancerBySpringCGLIB$$c5afe578$$FastClassBySpringCGLIB$$99d29d2a.invoke(<generated>)
    |   |           at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    |   |           at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig$$EnhancerBySpringCGLIB$$c5afe578.userConnectionFactory(<generated>)
    |   |           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    |   |           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    |   |           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    |   |           at java.lang.reflect.Method.invoke(Unknown Source)
    |   |           at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    |   |           at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
    |   |           at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
    |   |           at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    |   |           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
    |   |           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    |   |           at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:322)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig$$EnhancerBySpringCGLIB$$c5afe578.userConnectionFactory(<generated>)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig.connectionFactory(MessagingConfig.java:72)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig$$EnhancerBySpringCGLIB$$c5afe578.CGLIB$connectionFactory$4(<generated>)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig$$EnhancerBySpringCGLIB$$c5afe578$$FastClassBySpringCGLIB$$99d29d2a.invoke(<generated>)
    |   |           at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    |   |           at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309)
    |   |           at com.tgt.cwl.msg.config.MessagingConfig$$EnhancerBySpringCGLIB$$c5afe578.connectionFactory(<generated>)
    |   |           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    |   |           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    |   |           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    |   |           at java.lang.reflect.Method.invoke(Unknown Source)
    |   |           at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    |   |           at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
    |   |           at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
    |   |           at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    |   |           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
    |   |           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    |   |           at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1120)
    |   |           at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1044)
    |   |           at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)
    |   |           at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
    |   |           at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    |   |           at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
    |   |           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
    |   |           at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
    |   |           at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    |   |           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
    |   |           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    |   |           at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
    |   |           at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
    |   |           at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
    |   |           at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663)
    |   |           at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629)
    |   |           at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677)
    |   |           at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548)
    |   |           at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489)
    |   |           at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
    |   |           at javax.servlet.GenericServlet.init(GenericServlet.java:158)
    |   |           at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
    |   |           at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
    |   |           at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
    |   |           at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5262)
    |   |           at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5550)
    |   |           at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    |   |           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    |   |           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    |   |           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    |   |           at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
    |   |           at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
    |   |           at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    |   |           at java.util.concurrent.FutureTask.run(Unknown Source)
    |   |           at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    |   |           at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    |   |           at java.lang.Thread.run(Unknown Source)
    |   |   Caused by: java.lang.NullPointerException
    |   |           at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:169)
    |   |           ... 124 more
    |   |
    |   |   StackTrace:2  :-  java.lang.NullPointerException
    |   |           at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:169)
    |   |           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    |   |           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    |   |           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    |   |           at java.lang.reflect.Method.invoke(Unknown Source)
    |   |           at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:183)
    |   |           at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3330)
    |   |           at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:275)
    |   |           at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:76)
    |   |           at com.ibm.mq.jms.MQQueueConnectionFactoryFactory.getObjectInstance(MQQueueConnectionFactoryFactory.java:73)

.......
    No Components Found


                                      Stack trace
                                      -----------

    Stack trace to show the location of the FFST call
    |   FFST Location  :-  java.lang.Exception
    |       at com.ibm.msg.client.commonservices.trace.Trace.getCurrentPosition(Trace.java:1854)
    |       at com.ibm.msg.client.commonservices.trace.Trace.createFFSTString(Trace.java:1793)
    |       at com.ibm.msg.client.commonservices.trace.Trace.ffstInternal(Trace.java:1674)
    |       at com.ibm.msg.client.commonservices.trace.Trace.ffst(Trace.java:1540)
    |       at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:215)
    |       at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3330)
    |       at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:275)
    |       at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:76)
    |       at com.ibm.mq.jms.MQQueueConnectionFactoryFactory.getObjectInstance(MQQueueConnectionFactoryFactory.java:73)
    |       at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)
    |       at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
    |       at org.apache.naming.NamingContext.lookup(NamingContext.java:842)
    |       at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
    |       at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
    |       at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
    |       at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
    |       at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
    |       at org.apache.naming.NamingContext.lookup(NamingContext.java:830)

1 个答案:

答案 0 :(得分:0)

我终于解决了它。这是由于tomcat的类加载层次结构。 mq类由不同的类加载器加载,javax.jms类由不同的类加载器加载。