向IBM MQ 中发送soap报文 老是报空指针 100C

报错信息如下:
com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.setProviderFactory(JmsConnectionFactoryImpl.java:163)
at com.ibm.mq.jms.MQConnectionFactory.(MQConnectionFactory.java:281)
at com.tds.bankCommInterface2.Sender.main(Sender.java:175)

附下代码:
    MQConnectionFactory factory = new MQConnectionFactory();
        LogFile.log(LogFile.Severity.DEBUG, "test5");
        try {

            factory.setHostName("182.247.251.41");
            factory.setPort(Integer.parseInt("1415"));
            factory.setChannel("SYSTEM.DEF.SVRCONN");
            factory.setQueueManager("MQCHNBNMP01");
            factory.setCCSID(Integer.parseInt("1208"));
            factory.setTransportType(Integer.parseInt("1"));
            Connection connection = factory.createConnection();
            connection.start();

            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

            MQQueue sendQueue = new MQQueue("REMOTEQ.EGSP01.REQ");
            MessageProducer producer = session.createProducer(sendQueue);
            Message request = session.createTextMessage(requestMessage.toString());
            LogFile.log(LogFile.Severity.DEBUG, "Request Message: " + requestMessage);
            producer.send(request);
            LogFile.log(LogFile.Severity.INFO, "Send Completed: uuid=" + uuid);

            // 清空接收队列
            MQQueue reciveQueue = new MQQueue("LOCALQ.CHNBNMP01.RSP");
            MessageConsumer comsumer = session.createConsumer(reciveQueue);
            while (true) {
                Message response = comsumer.receive(1000);
                if (response != null && response instanceof JMSTextMessage) {
                    String responseMessage = ((JMSTextMessage) response).getText();
                    LogFile.log(LogFile.Severity.DEBUG, "Response Message: " + responseMessage);
                } else {
                    break;
                }
            }

            session.close();
            connection.close();
        } catch (JMSException jmse) {
            LogFile.log(LogFile.Severity.ERR, "Send Exception: uuid=" + uuid + " exception=" + jmse.toString());
            LogFile.log(LogFile.Severity.ERR, jmse.getLinkedException().toString());
        }

    }
}

现在能确保消息队列是通的,为什么我MQConnectionFactory里面的配置都写死进去了,还是报空指针异常?求解答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问