• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2953
  • Last Modified:

Need Assist Setting Up MQ Environment to Run JMSAdmin

Givens:

MQ Version
Name:        WebSphere MQ
Version:     530.7  CSD07
CMVC level:  p530-07-L040527
BuildType:   IKAP - (Production)

O/S

oslevel = AIX 4.3.3.0

When I run the following script...

#!/bin/sh

export MQ_JAVA_LOG_PATH=/usr/mqm/java/log
export MQ_JAVA_TRACE_PATH=/usr/mqm/java/trace
export MQ_JAVA_LIB_PATH=/usr/mqm/java/lib
CLASSPATH=/usr/jdk_base/lib/classes.zip:/usr/mqm/java/lib/jms.jar:/usr/mqm/java/lib/com.ibm.mq.jar:/usr/mqm/java/lib/com.ibm.mqjms.jar;/usr/mqm/java/lib/jta.jar:/usr/mqm/java/lib/connector.jar:/usr/mqm/java/lib/jndi.jar:/usr/mqm/java/lib/providerutil.jar:/usr/mqm/java/lib/fscontext.jar:/usr/mqm/samp/javaclnt/lang_dir
#
java -DMQJMS_LOG_DIR=$MQ_JAVA_LOG_PATH -DMQJMS_TRACE_DIR=$MQ_JAVA_TRACE_PATH -DMQJMS_INSTALL_PATH=$MQ_JAVA_LIB_PATH /usr/mqm/lib/com/ibm/mq/jms/admin/JMSAdmin $*

... I get the error...

$ JMSAdmin
JMSAdmin[6]: /usr/mqm/java/lib/jta.jar:/usr/mqm/java/lib/connector.jar:/usr/mqm/
java/lib/jndi.jar:/usr/mqm/java/lib/providerutil.jar:/usr/mqm/java/lib/fscontext
.jar:/usr/mqm/samp/javaclnt/lang_dir:  not found.
Invalid class name: /usr/mqm/lib/com/ibm/mq/jms/admin/JMSAdmin
Usage: java [-options] class

where options include:
    -help             print out this message
    -version          print out the build version
    -fullversion      print out the full version information
    -v -verbose       turn on verbose mode
    -debug            enable remote JAVA debugging
    -noasyncgc        don't allow asynchronous garbage collection
    -verbosegc        print a message when garbage collection occurs
    -noclassgc        disable class garbage collection
    -cs -checksource  check if source is newer when loading classes
    -ss<number>       set the maximum native stack size for any thread
    -oss<number>      set the maximum Java stack size for any thread
    -ms<number>       set the initial Java heap size
    -mx<number>       set the maximum Java heap size
    -D<name>=<value>  set a system property
    -classpath <directories separated by colons>
                      list directories in which to look for classes
    -prof[:<file>]    output profiling data to ./java.prof or ./<file>
    -verify           verify all classes when read in
    -verifyremote     verify classes read in over the network [default]
    -noverify         do not verify any class

 DEFAULTS:
    -ss: 256K, -oss: 400K, -ms: 1M, -mx: 32M

Any help to enable me to run the JMSAdmin facility will be highly rewarded.
0
HBelcher
Asked:
HBelcher
  • 3
  • 3
1 Solution
 
Peter KwanCommented:
Your java command is wrong.

You should write as this:
java -DMQJMS_LOG_DIR=$MQ_JAVA_LOG_PATH -DMQJMS_TRACE_DIR=$MQ_JAVA_TRACE_PATH -DMQJMS_INSTALL_PATH=$MQ_JAVA_LIB_PATH com.ibm.mq.jms.admin.JMSAdmin $*
0
 
Peter KwanCommented:
Sorry, missed:

java -classpath $CLASSPATH -DMQJMS_LOG_DIR=$MQ_JAVA_LOG_PATH -DMQJMS_TRACE_DIR=$MQ_JAVA_TRACE_PATH -DMQJMS_INSTALL_PATH=$MQ_JAVA_LIB_PATH com.ibm.mq.jms.admin.JMSAdmin $*
0
 
Peter KwanCommented:
Also your classpath has a typo. The separator should be ":", not ";" in UNIX

CLASSPATH=/usr/jdk_base/lib/classes.zip:/usr/mqm/java/lib/jms.jar:/usr/mqm/java/lib/com.ibm.mq.jar:/usr/mqm/java/lib/com.ibm.mqjms.jar:/usr/mqm/java/lib/jta.jar:/usr/mqm/java/lib/connector.jar:/usr/mqm/java/lib/jndi.jar:/usr/mqm/java/lib/providerutil.jar:/usr/mqm/java/lib/fscontext.jar:/usr/mqm/samp/javaclnt/lang_dir
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
HBelcherAuthor Commented:
I have been working on this all day...

Here is the latest version of batch file...

#!/bin/sh

export MQ_JAVA_LOG_PATH=/usr/mqm/java/log
export MQ_JAVA_TRACE_PATH=/usr/mqm/java/trace
export MQ_JAVA_LIB_PATH=/usr/mqm/java/lib
#
export CLASSPATH="\
$MQ_JAVA_LIB_PATH/com.ibm.mq.jar:\
$MQ_JAVA_LIB_PATH/com.ibm.mqbind.jar:\
$MQ_JAVA_LIB_PATH/com.ibm.mqjms.jar:\
$MQ_JAVA_LIB_PATH/jms.jar:\
$MQ_JAVA_LIB_PATH/jndi.jar:\
$MQ_JAVA_LIB_PATH/jta.jar:\
$MQ_JAVA_LIB_PATH/connector.jar:\
$MQ_JAVA_LIB_PATH/ldap.jar:\
$MQ_JAVA_LIB_PATH/fscontext.jar:\
$MQ_JAVA_LIB_PATH/providerutil.jar:\
$MQ_JAVA_LIB_PATH:\
/usr/jdk_base/lib/classes.zip:\
$CLASSPATH"
#
java -DMQJMS_LOG_DIR=$MQ_JAVA_LOG_PATH -DMQJMS_TRACE_DIR=$MQ_JAVA_TRACE_PATH -DMQJMS_INSTALL_PATH=$MQ_JAVA_LIB_PATH com.ibm.mq.jms.admin.JMSAdmin $*

I now get this error...

$ JMSAdmin
java.lang.NoClassDefFoundError: java/security/PrivilegedAction
        at
        at com.ibm.mq.jms.admin.JMSAdmin.<init>(Compiled Code)
        at com.ibm.mq.jms.admin.JMSAdmin.main(Compiled Code)
0
 
HBelcherAuthor Commented:
Thx pkwan. As u can see, I already caught most of your reported errors. How would you identify cause of latest error?
0
 
HBelcherAuthor Commented:
I think I discovered the issue. We have JDK 1.1.8 currectly installed. Ver 5.3 of MQ requires 1.3.1 or greater.

Snippet:

WebSphere MQ classes for Java and Java Message Service
General Notes
1) Supported JDK versions:

   AIX            IBM JDK 1.3.1

2) If you want to use Pub/Sub applications you need one of the following:

from http://www-306.ibm.com/software/integration/mqfamily/support/readme/aix530_read.html

0
 
DarthModCommented:
PAQed with points (500) refunded

DarthMod
Community Support Moderator
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now