Topic
  • 3 replies
  • Latest Post - ‏2005-12-29T07:36:36Z by shalu
SystemAdmin
SystemAdmin
684 Posts

Pinned topic javax/resource/ResourceException

‏2005-07-19T13:40:39Z |
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.
Updated on 2005-12-29T07:36:36Z at 2005-12-29T07:36:36Z by shalu
  • SystemAdmin
    SystemAdmin
    684 Posts

    Re: javax/resource/ResourceException

    ‏2005-07-19T14:17:34Z  
    Hi,

    You might want to try posting this on the ibm.software.websphere.mq
    newsgroup.

    Regards

    Tony

    guptaneha12@yahoo.com wrote:
    > 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.
  • SystemAdmin
    SystemAdmin
    684 Posts

    Re: javax/resource/ResourceException

    ‏2005-07-19T14:31:51Z  
    Hi,

    A quick look, think you haven't got connector.jar on your classpath.
    connector.jar can be found in MQ_INSTALL_DIR/java/lib

    Regards

    Tony

    guptaneha12@yahoo.com wrote:
    > 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.
  • shalu
    shalu
    1 Post

    Re: javax/resource/ResourceException

    ‏2005-12-29T07:36:36Z  
    Hi,

    A quick look, think you haven't got connector.jar on your classpath.
    connector.jar can be found in MQ_INSTALL_DIR/java/lib

    Regards

    Tony

    guptaneha12@yahoo.com wrote:
    > 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.
    For ur program to run successfully ,just add connector.jar ,jta.jar in ur build path.The same program is working for me with jdk 1.3