使用websphere mQ将消息发送到队列时出现以下错误。 -FFDC调用未初始化的Trace模块

时间:2016-04-04 13:17:23

标签: jms ibm-mq

我正在尝试使用Websphere MQ将消息发送到队列但在发送消息时出现以下错误

-FFDC在未初始化的跟踪模块中调用

以下是我的代码:

        MQQueueConnectionFactory cf=new MQQueueConnectionFactory();

          cf.setHostName("localhost");
          cf.setPort(1414);
          cf.setTransportType(1);
          cf.setQueueManager("LocalManager");
          cf.setChannel("xyz");


        MQQueueConnection  connection = (MQQueueConnection) cf.createQueueConnection();


          MQQueueSession session = (MQQueueSession) connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
          MQQueue queue = (MQQueue) session.createQueue("queue:///inputQ");
          MQQueueSender sender =  (MQQueueSender) session.createSender(queue);
          MQQueueReceiver receiver = (MQQueueReceiver) session.createReceiver(queue);      
          System.out.println("creating message");
          JMSTextMessage message = (JMSTextMessage) session.createTextMessage("Test message");     

          connection.start();


          sender.send(message);
          System.out.println("message sent");

错误在我不知道的控制台中 -

FFDC called in uninitialized Trace module



                                    FDCTitle


Product          :- ProductName
Date/Time        :- Mon Apr 04 17:49:55 IST 2016
System time      :- 1459772395537
Operating System :- Windows 7
UserID           :- xyz
Java Vendor      :- Oracle Corporation
Java Version     :- 21.0-b17



                                      Data
                                      ----

|   connectionTypeName  :-  com.ibm.msg.client.wmq
|   exception           :-  ExceptionDepth is 2
|   exception           :-  
|   |   Cause:1       :-  java.lang.NullPointerException
|   |   StackTrace:1  :-  java.lang.NullPointerException
|   |       at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:180)
|   |       at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3314)
|   |       at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:283)
|   |       at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:81)
|   |       at MQHeader.main(MQHeader.java:20)
|   |   
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:1972)
|       at com.ibm.msg.client.commonservices.trace.Trace.createFFSTString(Trace.java:1911)
|       at com.ibm.msg.client.commonservices.trace.Trace.ffstInternal(Trace.java:1800)
|       at com.ibm.msg.client.commonservices.trace.Trace.ffst(Trace.java:1673)
|       at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:214)
|       at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3314)
|       at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:283)
|       at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:81)
|       at MQHeader.main(MQHeader.java:20)
|   


                           WorkQueueMananger Contents
                           --------------------------

|   Maintain ThreadPool size     :-  false
|   Maximum ThreadPool size      :-  -1
|   ThreadPool inactive timeout  :-  0
|   unavailable -                :-  com.ibm.msg.client.commonservices.CSIException: JMSCS0002

                               Runtime properties
                               ------------------

|   Available processors         :-  4
|   Free memory in bytes (now)   :-  125076032
|   Max memory in bytes          :-  1886519296
|   Total memory in bytes (now)  :-  127074304

                           Component Manager Contents
                           --------------------------

Common Services Components:
Messaging Provider Components:




FFDC called in uninitialized Trace module



                                    FDCTitle


Product          :- ProductName
Date/Time        :- Mon Apr 04 17:49:55 IST 2016
System time      :- 1459772395584
Operating System :- Windows 7
UserID           :- xyz
Java Vendor      :- Oracle Corporation
Java Version     :- 21.0-b17

Source Class     :- com.ibm.mq.jms.MQQueueConnectionFactory
Source Method    :- readObject()
ProbeID          :- XF001003
Thread           :- name=main priority=5 group=main ccl=sun.misc.Launcher$AppClassLoader@37af78ce

                                      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:1972)
|       at com.ibm.msg.client.commonservices.trace.Trace.createFFSTString(Trace.java:1911)
|       at com.ibm.msg.client.commonservices.trace.Trace.ffstInternal(Trace.java:1800)
|       at com.ibm.msg.client.commonservices.trace.Trace.ffst(Trace.java:1624)
|       at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3324)
|       at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:283)
|       at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:81)
|       at MQHeader.main(MQHeader.java:20)
|   


                           WorkQueueMananger Contents
                           --------------------------

|   Maintain ThreadPool size     :-  false
|   Maximum ThreadPool size      :-  -1
|   ThreadPool inactive timeout  :-  0
|   unavailable -                :-  com.ibm.msg.client.commonservices.CSIException: JMSCS0002

                               Runtime properties
                               ------------------

|   Available processors         :-  4
|   Free memory in bytes (now)   :-  124412624
|   Max memory in bytes          :-  1886519296
|   Total memory in bytes (now)  :-  127074304

                           Component Manager Contents
                           --------------------------

Common Services Components:
Messaging Provider Components:


                             FFST Object Properties
                             ----------------------

All currently set properties
|   XMSC_CONNECTION_TYPE       :-  1
|   XMSC_CONNECTION_TYPE_NAME  :-  com.ibm.msg.client.wmq


FFDC called in uninitialized Trace module



                                    FDCTitle


Product          :- ProductName
Date/Time        :- Mon Apr 04 17:49:55 IST 2016
System time      :- 1459772395589
Operating System :- Windows 7
UserID           :- xyz
Java Vendor      :- Oracle Corporation
Java Version     :- 21.0-b17

Source Class     :- com.ibm.msg.client.commonservices.nls.PINLSServices
Source Method    :- createException(String,HashMap)
ProbeID          :- XC003001
Thread           :- name=main priority=5 group=main ccl=sun.misc.Launcher$AppClassLoader@37af78ce

                                      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:1972)
|       at com.ibm.msg.client.commonservices.trace.Trace.createFFSTString(Trace.java:1911)
|       at com.ibm.msg.client.commonservices.trace.Trace.ffstInternal(Trace.java:1800)
|       at com.ibm.msg.client.commonservices.trace.Trace.ffst(Trace.java:1624)
|       at com.ibm.msg.client.commonservices.nls.PINLSServices.createException(PINLSServices.java:121)
|       at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:233)
|       at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:109)
|       at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:172)
|       at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.setProviderFactory(JmsConnectionFactoryImpl.java:168)
|       at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:293)
|       at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:81)
|       at MQHeader.main(MQHeader.java:20)
|   

                           WorkQueueMananger Contents
                           --------------------------

|   Maintain ThreadPool size     :-  false
|   Maximum ThreadPool size      :-  -1
|   ThreadPool inactive timeout  :-  0
|   unavailable -                :-  com.ibm.msg.client.commonservices.CSIException: JMSCS0002

                               Runtime properties
                               ------------------

|   Available processors         :-  4
|   Free memory in bytes (now)   :-  124412624
|   Max memory in bytes          :-  1886519296
|   Total memory in bytes (now)  :-  127074304

                           Component Manager Contents
                           --------------------------

Common Services Components:
Messaging Provider Components:

1 个答案:

答案 0 :(得分:0)

  

不可用 - : -   com.ibm.msg.client.commonservices.CSIException:JMSCS0002

您似乎未包含所有必需的MQ JAR文件。您至少缺少 com.ibm.mq.jmqi.jar MQ JAR文件。