WSADMIN Tutorial – Part1

This is a 3 part tutorial series. This is the first of the three and in this i presented the basics of WSADMIN Tool and 5 objects we had with WSADMIN tool in websphere.

The idea behind this series of tutorials is to present here is something that can be easy for a beginner to understand and for an experienced guy to provide a quick access to the information.

WSADMIN is a scripting interface used at the command line. You can use the wsadmin tool to manage WebSphere Application Server as well as the configuration, application deployment, and server run-time operations.

WSADMIN tool can be run in 3 different modes

1. Interactive mode

This is the default mode. In this you’ll enter the command, wait for output and then enter the second command. This is useful for quick administrative tasks


>wsadmin> your Command



2. Inline mode

You can specify this mode by using –C after wsadmin. Here you will run one command at a time. The command will specified inline with wsadmin.

$ –C your_command

3. Using a File Input

A script file can be given as input using –f option along with wsadmin.

$ –f your_script_file

How to use WSADMIN host<host> port<port>

  • Host name is the name of the machine which has websphere running and port number is either SOAP or RMI port number of the websphere JVM to which you want to connect.
  • If the Global security is enabled…you will be asked for user name and password or you can specify it inline using –user and –password.
  • you can specify the language of the script file, the command, or an interactive shell using –lang. The possible languages include: Jacl and Jython
  • you can run the profile scripts before executing the actual wsadmin commands by using –profile option.
  • To specify the profile from which the wsadmin tool will run, you can use –profileName option.
  • Note: the wsadmin command will be available in bin directory of your DMGR as well as the bin your application server profiles.
  • you can use either SOAP or RMI to connect to the wsadmin and this can be specifeid using –conntype option.

WSADMIN Syntax and all options

wsadmin [-c <commands>] [-p <properties_file_name>] [-profile <profile_script_name>] [-profileName <profile_name>] [-f <script_file_name>] [-javaoption java_option] [-lang language] [-wsadmin_classpath classpath] [-conntype SOAP [-host host_name] [-port port_number] [-user userid] [-password password] | RMI [-host host_name] [-port port_number] [-user userid] [-password password] | NONE]

Example: wsadmin -lang jython -f -profile -conntype SOAP -port mymachinesoapportnumber -host mymachine -userid userid -password password

WSADMIN has 5 objects

  1. Help – The Help object provides general help and dynamic online information about the currently running MBeans. You can use the Help object as an aid in writing and running scripts with the AdminControl object.
  2. AdminConfig – Use the AdminConfig object to invoke configuration commands and to create or change elements of the WebSphere Application Server configuration
  3. AdminControl – Use the AdminControl object to invoke operational commands that deal with running objects in the WebSphere Application Server.
  4. AdminApp – Use the AdminApp object to install, modify, and administer applications.
  5. AdminTask – Use the AdminTask object to run an administrative command.

Next Part: Using the WSADMIN objects: [using Jython language]


5 thoughts on “WSADMIN Tutorial – Part1

  1. Hi.. I have followed same steps to deploy Ear file to websphere 6.1. but it is throwing exception. I have mentioned how I have configured. please help me…

    C:\Program Files(x86)\IBM\WebSphere\AppServeri\profiles\AppSrvOi\bin> —lang jython —username guravaiah.earla —password *********

    ASX7209I: Connected to process “servers” on node DT—GURAURIAHNode01 using SOAP onnector; The type of process is: UnManagedProcess
    ASX7031I: For help, enter: “print Help-help()”

    wsadmin> print AdminApp.install(‘C:\Program Files (x86)\IBM\WebSphere\AppServeri\ .rofiles\AppSrvOl\installedApps\DT—GURAUAIAHNodeOiCell\providerEConnect.ear’)

    ASX7015E: Exception running command: “AdminApp.install(‘C:\Program Files (x86)\ IBM\WebSphere\AppServeri\profiles\AppSrvOl\installedApps\DT—GURAURIAHNodeOiCell\ .roviderEConnect.ear’)”;
    exception information: WASX7109E: Insufficient data for insta 11 task “MapWebModToUH
    ‘DMA0010E: A Ualidation error occurred in task Selecting virtual hosts for Web m ‘dules. A virtual host is not specified for Web module Admin_Module_7.5.0 with U ‘I providerEConnect.war,WEB—INF/web.xml.
    ‘DMA0010E: A Ualidation error occurred in task Selecting virtual hosts for Web m ‘dules. A virtual host is not specified for Web module Portal_Module_7.5.0 with RI providerEConnecthie.war,WEB—INF/web.xml.”

  2. I am trying to automate deployment for my ear application
    how do i provide virtual host , select ejb deployr and othe information in my jacl script
    please provide me the format.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s