|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
java.lang.NoClassDefFoundError |
« View previous topic :: View next topic » |
Author |
Message
|
mqs_guy |
Posted: Mon Mar 31, 2003 1:00 pm Post subject: java.lang.NoClassDefFoundError |
|
|
Acolyte
Joined: 09 May 2002 Posts: 71
|
Hi,
I am using MQSeries 5.3 which has classes for Java inbuilt. so we need not install MA88 product.
I wrote a sample code to connect to the queue manager on the AIX system. The code compiles perfectly but when try to run that code i get the error as below
********************************************************
java.lang.NoClassDefFoundError: java/security/PrivilegedAction
at com.ibm.mq.MQSESSIONServer.getMQSESSION(Compiled Code)
at com.ibm.mq.MQSESSION.getSession(Compiled Code)
at com.ibm.mq.MQManagedConnectionJ11.<init>(Compiled Code)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(Compiled Code)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(Compiled Code)
*******************************************************
I am using java version 1.1.8 on AIX.
CLASSPATH is
/usr/bin:/usr/mqm/java/lib/com.ibm.mq.jar:/usr/mqm/java/lib/com.ibm.mqbind.jar:/usr/mqm/java/lib/jta.jar:/usr/mqm/java/lib/connector.jar:
PATH is
/usr/bin:/usr/mqm/java/lib/com.ibm.mq.jar:/usr/mqm/java/lib/com.ibm.mqbind.jar:/usr/mqm/java/lib/jta.jar:/usr/mqm/java/lib/connector.jar:/etc:/usr/sbin:/usr/ucb:/home/mqm/bin:/usr/bin/X11:/sbin:.
LD_LIBRARY_PATH is
/usr/mqm/java/lib:
Awaiting your feedbacks as i am unable to proceed.
Regards,
Vishal |
|
Back to top |
|
 |
vennela |
Posted: Mon Mar 31, 2003 1:39 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
As indicated in previous post you should upgrade your JDK to 1.4.
Also MQ 5.3 is not supported for JDK levels below 1.3
Is there any reason that you don't want to upgrade your JDK.
-------
Venny |
|
Back to top |
|
 |
mqs_guy |
Posted: Mon Mar 31, 2003 2:16 pm Post subject: |
|
|
Acolyte
Joined: 09 May 2002 Posts: 71
|
Dear Venny,
Thanks for your input.
I have java version 1.3.0 and java 1.3.1 installed on AIX.
Even if i point to this directory (ie)
/usr/java130/bin or /usr/java131/bin still i face the same error.
- Vishal |
|
Back to top |
|
 |
vennela |
Posted: Mon Mar 31, 2003 2:50 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Vishal:
I haven't worked with that combination
MQ 5.3, JDK 1.3 on AIX.
This program works on
MQ 5.3 JDK 1.3 Windows
MQ 5.2 CSD 6 JDK 1.3 and AIX
Try this and see if you get the same error again
Code: |
import com.ibm.mq.*;
public class Send extends Object {
public Send() {
}
/**
* @param args the command line arguments
*/
public static void main (String args[]) {
try {
String QM1 = "QMGRNAME";
String QUEUE1 = "SYSTEM.DEFAULT.LOCAL.QUEUE";
MQQueueManager qmgr = new MQQueueManager(QM1 ) ;
System.out.println("Connected to QMGR " + QM1);
int openOptions = MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING ;
MQQueue InQueue = qmgr.accessQueue(QUEUE1 , openOptions, null, null, null);
MQMessage inMessage = new MQMessage();
inMessage.writeString("What is your name");
InQueue.put(inMessage);
System.out.println("Message Id is :" + inMessage.messageId);
InQueue.close();
qmgr.disconnect() ;
}
catch(MQException ex){
System.out.println("MQ Error - Reason code :" + ex.reasonCode);
}
catch (Exception e){
System.out.println("Error : " + e);
}
}
} |
Replace the QMGRNAME with your QMGR name. Call it Send.java and run it as
java Send
-------
Venny |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|