Problem on MQSeries,
843830Nov 18 2003 — edited Mar 10 2005Hi all, I'm new on this, I'm doing this little test program, but when I execute..
C:\Java14\bin>java send1
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mq/iiop/MQSESSION
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:241)
at send1.main(send1.java:16)
<<show me this message..
------------------------------
If I use -noverify... this happen:
C:\Java14\bin>java -noverify send1
MQJE001: Completion Code 2, Reason 2039
An MQ error occurred : Completion code 2 Reason code 2039
____________________________
this is my code:
import com.ibm.mq.*;
public class send1
{
public static String hostname = "localhost";
public static String channel = "java.channel";
public static String qManager = "QM1";
public static String queue = "Q1";
public static MQQueueManager qMgr;
public static void main(String args[]) {
MQEnvironment.hostname = hostname;
MQEnvironment.channel = channel;
try {
qMgr = new MQQueueManager(qManager);
// int openOptions = MQC.MQOO_OUTPUT ;
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF +
MQC.MQOO_BROWSE +
MQC.MQOO_FAIL_IF_QUIESCING;
MQQueue system_default_local_queue = qMgr.accessQueue(queue ,openOptions);
MQMessage hello_world = new MQMessage();
hello_world.writeUTF("Hello World!" ) ;
MQPutMessageOptions pmo = new MQPutMessageOptions();
system_default_local_queue.put(hello_world,pmo);
system_default_local_queue.close();
qMgr.disconnect();
}
catch (MQException ex)
{
System.out.println("An MQ error occurred : Completion code " +
ex.completionCode +
" Reason code " + ex.reasonCode);
}
catch (java.io.IOException e)
{
System.out.println("An error occurred while writing to the message buffer: " + e );
}
}
}
_____________________
I have win2k_p, and websphere MQ installed on my pc.
some help? I've tried a lot..