简体   繁体   中英

Websphere MQ error 2018

I am facing MQ error 2018, on connecting to the broker and havent really been able to figure out what the problem is

It is an extremely simple code and this is how it works

  1. Connects to MQ
  2. Reads
  3. closed read queue
  4. Write
  5. Closed write queue
  6. Disconnects from quueu manager, and repeats the above process .

    try {

    if(mqConnect()){ mqRead()
    queue.close() mqWrite() queue.close() mqdisconnect() }

    } finally { if (mqQueueManager!= null) { mqDisconnect(); }

Can someone suggest me what I am doing wrong please

2018 means the MQQueueManager instance being used in your application is invalid. There are number of reasons for throwing 2018. Most of common is attempt to use MQQueueManager instance after Disconnect method has been called.

I am not sure which method call in your programming is throwing 2018. It would help if you could post actual code and point failing method call.

Well, it appears you are trying to get messages from a queue when the connect failed. Also, where is the code to open the queue? Please show us the real code for what you are trying to do.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM