Skip to main content

Problem:

  • Product Name: Borland AppServer
  • Product Version: 6.7
  • Product Component: iastool
  • Platform/OS Version: All
  • Java Version: 1.5 or 1.6

What are the return values of iastool commands?

Resolution:


The iastool utility is a set of command-line tools for manipulating managed objects. The documentation of this tool can be found at Chapter 36: iastool command-line utility of Borland AppServer 6.7 Developer"s Guide.

However, when application developer needs to wrap the iastool by creating a C or Java application or applet and invoke iastool programmatically; or by creating script, the application developer needs to know the return values of iastool to behave accordingly (i.e. exception handling or retry the command), aside from displaying the message to the standard output or error.


Attached sheet are the return values of the "iastool" sub-commands.

For example, the return values of "iastool -deploy " are the following:

Return Value Description
0 OK
1 Deployment Process failed
10 Bad option provided
19 Bad JARs parameter
32 Bad host parameter
33

Bad host or server parameter (this is possibly due to using between -host

and -server which is already deprecated)

34 Bad management port parameter
36 Bad partition parameter

Here come a couple of sample outputs using the attached test code:

  1. Test case A: sgrdd-mdultra does not host the scu process
    Command: "iastool -deploy -host -sgrdd-mdultra -cfg myBASConfigurationName -partition myBASPartition -realm ServerRealm -user admin -pwd admin -jars deploy.jar"
    Result:
      D:\\Borland\\Solution\\00018100>javac DeployCommand.java
     D:\\Borland\\Solution\\00018100>java DeployCommand
     Error: Invalid host/listener port specified: sgrdd-mdultra.
    Here is the standard error of the command (if any):
      Return code: 32
  2. Test case B: sgrdd-mdultra is running scu process at port 42671, myBASConfigurationName and myBASPartition do not exist
    Command: "iastool -deploy -host -sgrdd-mdultra:42671 -cfg myBASConfigurationName -partition myBASPartition -realm ServerRealm -user admin -pwd admin -jars deploy.jar"
    Result:
      D:\\Borland\\Solution\\00018100>java DeployCommand
     Error: Jar not found or not a file:  D:\\Borland\\Solution\\00018100\\src\\test\\deploy.jar
    Here is the standard error of the command (if any):
      Return code: 19
  3. Test case C: sgrdd-mdultra is running scu process at port 42671 with wrong parameter
    Command: "iastool -deploy -hub SGRDD-MDULTRA -qwerty j2eeSample -partition MyPartition -mgmtport 42671 -realm ServerRealm -user admin -pwd admin -jars ./bank_basic.war"
    Result:
      D:\\Borland\\Solution\\00018100>java DeployCommand
    Invalid option/argument(s) specified for "-deploy" command tool:
      j2eesample
      -qwerty
    Here is the standard error of the command (if any):
      Return code: 10
     
  4. Test case D: sgrdd-mdultra is running scu process at port 42671. Commands and parameters are supplied correctly and deployment is successful
    Command: "iastool -deploy -hub SGRDD-MDULTRA -cfg j2eeSample -partition MyPartition -mgmtport 42671 -realm ServerRealm -user admin -pwd admin -jars ./bank_basic.war"
    Result:
      D:\\Borland\\Solution\\00018100>java DeployCommand
      Deploying modules...
      Generating stubs for bank_basic.war
      Warning: No generated stub files were found.
      Stubs successfully generated
      Merging archive contents: _bes_stubs.jar
      Merging archive contents: bank_basic.war
      Verifying C:\\Borland\\AppServer6.7\\tmp\\cmdtool\\mdultra\\tmpbes_21834\\bank_basic.war
      Verifying web module bank_basic.war [role=deployer]
      ...verifying library module WEB-INF/lib/_bes_stubs.jar in bank_basic.war
      0 errors, 0 warnings
      Deploying modules to partition MyPartition
      Deploying bank_basic.war to partition:SGRDD-MDULTRA/j2eeSample/MyPartition
      Enabling modules in partition MyPartition
      Deployment completed
      Deployed successfully
    Here is the standard error of the command (if any):
      Return code: 0
Return values of iastool.xls
DeployCommand.java
Old KB# 29826

#BorlandAppServer
#Security
#iastool
#VisiBroker