javax/resource/ResourceException - Websphere

This is a discussion on javax/resource/ResourceException - Websphere ; Dear All, I have developed a small application using j2sdk1.4.1 It is failing while queue manager connect. the code is as follows: int openOptions = MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING; queueManager = new MQQueueManager("NDS1T.SSS.SFMS.QMGR"); MQQueue queue = queueManager.accessQueue("NDS1T.SFMS.LOCQ", openOptions); MQPutMessageOptions pmo = ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: javax/resource/ResourceException

  1. javax/resource/ResourceException

    Dear All,


    I have developed a small application using j2sdk1.4.1

    It is failing while queue manager connect. the code is as follows:

    int openOptions = MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING;
    queueManager = new MQQueueManager("NDS1T.SSS.SFMS.QMGR");
    MQQueue queue = queueManager.accessQueue("NDS1T.SFMS.LOCQ", openOptions);
    MQPutMessageOptions pmo = new MQPutMessageOptions();
    pmo.options = MQC.MQPMO_SYNCPOINT + MQC.MQPMO_FAIL_IF_QUIESCING;
    MQMessage sendmsg = new MQMessage();
    sendmsg.clearMessage();
    sendmsg.format = MQC.MQFMT_STRING;
    sendmsg.correlationId = sCorrelId.getBytes("Cp500");
    sendmsg.messageId = sMessageId.getBytes("Cp500");
    sendmsg.messageType = nMqMsgTyp;
    sendmsg.write(sMsg.getBytes());
    queue.put(sendmsg);


    The exception it throws is as follows:

    Exception in thread "main" java.lang.NoClassDefFoundError: javax/resource/ResourceException


    Please help me regarding this.

  2. Re: javax/resource/ResourceException

    Problems like this are usually caused by your classpath not having all of the jar files. I'd suggest that you check out the Using Java manual for WMQ to make sure you have all of the right ones added.

+ Reply to Thread