Discussions

XML & Web services: Ant WAS ADMIN tasks

  1. Ant WAS ADMIN tasks (17 messages)

    I am trying to install an application to WAS server through ANT build script.I
    kept wsanttask.jar in my ant\lib\. Am running through my local machine which is
    on XP and trying to install on WAS server on AIX box. It will be a great help
    for me. Thanks. Here is my code in the script : <taskdef name="wsInstallApp"
    classname="com.ibm.websphere.ant.tasks.InstallApplication"/> <wsInstallApp
    wasHome="${wasInstallationdir}" ear="${earpath}/ABC.ear"
    profile="setupCmdLine.sh" conntype="SOAP" host="hostname" port="xxxx"/> while
    running the script am gettiing this message : [echo] installing ear on WAS
    server [wsInstallApp] Installing Application [D:\backup\PEXT.ear]... Unable to
    parse setupCmdLine: \usr\WebSphere\AppServer\bin\setupCmdLine.bat (The system
    cannot find the path specified) [wsadmin] The java class is not found:
    com/ibm/ws/bootstrap/WSLauncher [wsadmin] Java Result: 1 [wsInstallApp]
    Installed Application

    Threaded Messages (17)

  2. Ant WAS ADMIN tasks[ Go to top ]

    I assume this is a pre-WAS6 base websphere environment? If so, I think you need to FTP the EAR to the remote machine and do the install from there. If this were an ND installation, you would be able to do a remote install. In WAS6 remote file transfer is supported for non-managed nodes, so it may be possible to do a remote install from base-to-base, although I have never tried it.
    Also, I think you need to create a build batch file based on $WAS_HOME/bin/ws_ant.bat[sh] and run your build and deploy scripts from the batch files (probably the cause of the com/ibm/ws/bootstrap/WSLauncher Java class not found error).
    In addition, your task has the parameter, profile="setupCmdLine.sh". The profile option is for a JACL script that is to be executed before the main wsadmin command is executed. Ant task wsInstallApp is a wrapper for wsadmin command, AdminApp install.
    Ant has FTP and Telnet tasks which you may be able to use.

    Bill Lasley
    Versant Corp.
    http://www.versant.com
  3. Ant WAS ADMIN tasks[ Go to top ]

    So there no possibility that i can run ant WAS ADMIN tasks from WINDOWS XP while my WAS 5.1 app server is on linux.

    Any help is appreciated
  4. Ant WAS ADMIN tasks[ Go to top ]

    I think you can, by using the Ant FTP and Telnet tasks. However, deploying an application directly from development is not a best practice, particularly if your target is a production server. You should be creating a binary repository, which is versioned like your source code, from which deployments are made, via a repeatable and controlled process.

    Bill Lasley
    Versant Corp.
    http://www.versant.com
  5. Hi ,

    I am getting the same problem... Unable to parse setupCmdLine.bat( the system cannot find the specified file.) I have wasHome defined in my wsInstallApp task. For some reason I get the message \null\bin\setupCmdLine.bat not found.

    Am I not setting any environmental variables correctly.

    Thanks,

    Freekbolt
  6. Same problem[ Go to top ]

    Hey had the same problem solved it using the ws_ant util in the WAS_HOME/bin dir.


    Developl an ant file with the tasks: http://publib.boulder.ibm.com/infocenter/ws51help/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/javadoc/ae/index.html

    Eg.:
    <path id="ws.lib">
                <fileset dir="${websphere.home}/lib">
                    <include name="*.jar" />
                </fileset>
            </path>

    <!-- websphere -->
        <target name="wsListApp" depends="init" >
        <taskdef name="wsListApp" classname="com.ibm.websphere.ant.tasks.ListApplications">
                <classpath refid="ws.lib"/>
            </taskdef>
         <wsListApp
                wasHome="${websphere.home}"
            />
        </target>

    And call from the commandline:
    ws_ant -buildfile yourBuildFile.xml wsListApp

    This way you use IBM's jwm:
    [wsadmin] ************ Start Display Current Environment ************
      [wsadmin] Host Operating System is Linux, version 2.6.9-gentoo-r9
      [wsadmin] Java version = J2RE 1.4.2 IBM build cxia32142sr1w-20041028 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM

    Hope it helps
  7. IT can be done. below is a script that is tested. Not bad for a hick from Nebraska.

    <?xml version="1.0" encoding="UTF-8"?>

    <project name="clusterDeployIter1" default="build-all" basedir=".">

      <!-- ===================================================================== -->
      <!-- define global properties -->
      <!-- ===================================================================== -->
    <!--
    <property name="remoteAppName" value="MQWF_Web_Client_WEBCLI3"/>
    <property name="remoteAppName" value="BPSIter1"/>


    -->
    <property name="remoteAppName" value="ivtApp"/>
    <property name="clusterServerName" value="server2"/>

    <property name="remoteUatHostName" value="10.41.5.231"/>
    <property name="remoteUatFtpDir" value="/usr/WebSphere/AppServer/installableApps"/>
    <property name="remoteUatConnType" value="SOAP"/>
    <property name="remoteUatPort" value="8881"/>
    <property name="remoteUatUserId" value="root"/>
    <property name="remoteUatPassword" value="swiss"/>
    <property name="remoteUatFtpJarDir" value="/usr/WebSphere/AppServer/classes"/>

    <property name="remoteProdHostName" value="10.41.5.234"/>
    <property name="remoteProdConnType" value="SOAP"/>
    <property name="remoteProdPort" value="8882"/>
    <property name="remoteProdUserId" value="root"/>
    <property name="remoteProdPassword" value="swiss"/>
    <property name="remoteProdFtpJarDir" value="/usr/WebSphere/AppServer/classes"/>

    <property name="remoteDmgrPort" value="8889"/>


    <property name="mailHostName" value="dolsmtp.dol.state.ne.us"/>
    <tstamp>
             <format property="NOW" pattern="yyyy-MM-dd-HH-mm"/>
           </tstamp>


    <!-- change this to your local installation, if different -->

    <property name="existingEar.dir" value="C:/temp/ANT/unpack"/>
    <property name="existingEar" value="ivtApp.ear"/>

    <property name="existingJar.dir" value="C:/temp/ANT/unpack"/>
    <property name="existingJar" value="BPSIntegrationEJB.jar"/>

    <!-- change this to your local installation, if different -->

    <property name="wasHome.dir" value="C:\Progra~1\IBM\WebSph~1\Applic~1\v5.1.2\runtimes\base_v51"/>

    <taskdef name="wsStopApp" classname="com.ibm.websphere.ant.tasks.StopApplication"/>
    <taskdef name="wsStartApp" classname="com.ibm.websphere.ant.tasks.StartApplication"/>
    <taskdef name="wsUninstallApp" classname="com.ibm.websphere.ant.tasks.UninstallApplication"/>
    <taskdef name="wsInstallApp" classname="com.ibm.websphere.ant.tasks.InstallApplication"/>


    <target name="prepare">

    <ftp server="${remoteUatHostName}" userid="${remoteUatUserId}" password="${remoteUatPassword}" remotedir="${remoteUatFtpDir}" binary="yes" action="put">
    <fileset dir="${existingEar.dir}">
    <include name="${existingEar}"/>
    </fileset>

    </ftp>
    <!--
    <ftp server="${remoteUatHostName}" userid="${remoteUatUserId}" password="${remoteUatPassword}" remotedir="${remoteUatFtpJarDir}" binary="yes" action="put">
    <fileset dir="${existingJar.dir}">
    <include name="${existingJar}"/>
    </fileset>

    </ftp>

    <ftp server="${remoteProdHostName}" userid="${remoteProdUserId}" password="${remoteProdPassword}" remotedir="${remoteProdFtpJarDir}" binary="yes" action="put">
    <fileset dir="${existingJar.dir}">
    <include name="${existingJar}"/>
    </fileset>

    </ftp>
    -->
    </target>
    <!--
    <target name="stopWebApp1" depends="prepare">
    <wsStopApp wasHome="${wasHome.dir}"
    application="${remoteAppName}"
    server="${clusterServerName}"
    conntype="${remoteUatConnType}"
    host="${remoteUatHostName}"
    port="${remoteUatPort}"
    user="${remoteUatUserId}"
    password="${remoteUatPassword}"/>
    </target>

    <target name="stopWebApp2" depends="stopWebApp1">
    <wsStopApp wasHome="${wasHome.dir}"
    application="${remoteAppName}"
    server="${clusterServerName}"
    conntype="${remoteProdConnType}"
    host="${remoteProdHostName}"
    port="${remoteProdPort}"
    user="${remoteProdUserId}"
    password="${remoteProdPassword}"/>
    </target>

    <target name="uninstallEar" depends="stopWebApp2">
    <wsUninstallApp wasHome="${wasHome.dir}"
    application="${remoteAppName}"
    options="-cell uatNetwork -cluster DOL"
    conntype="${remoteUatConnType}"
    host="${remoteUatHostName}"
    port="${remoteDmgrPort}"
    user="${remoteUatUserId}"
    password="${remoteUatPassword}"/>
    </target>
    -->

    <target name="installEar" depends="prepare">
    <wsInstallApp ear="${existingEar.dir}/${existingEar}"
    wasHome="${wasHome.dir}"
    options="-cell uatNetwork -cluster DOL"
    conntype="${remoteUatConnType}"
    host="${remoteUatHostName}"
    port="${remoteDmgrPort}"
    user="${remoteUatUserId}"
    password="${remoteUatPassword}"/>
    </target>

    <target name="startWebApp1" depends="installEar">
    <wsStartApp wasHome="${wasHome.dir}"
    application="${remoteAppName}"
    server="${clusterServerName}"
    conntype="${remoteProdConnType}"
    host="${remoteProdHostName}"
    port="${remoteProdPort}"
    user="${remoteProdUserId}"
    password="${remoteProdPassword}"/>
    </target>

    <target name="startWebApp2" depends="startWebApp1">
    <wsStartApp wasHome="${wasHome.dir}"
    application="${remoteAppName}"
    server="${clusterServerName}"
    conntype="${remoteUatConnType}"
    host="${remoteUatHostName}"
    port="${remoteUatPort}"
    user="${remoteUatUserId}"
    password="${remoteUatPassword}"/>
    </target>

    <target name="build-all" depends="startWebApp2">

    <mail from="JFraser at dol dot state dot ne dot us" tolist="JFraser at dol dot state dot ne dot us" subject="deployed on UAT" mailhost="${mailHostName}" mailport="25">
    <message mimetype="text/html"> There is a new ear file in the installableApps folder of Server UAT </message>
    </mail>
         </target>

    </project>
  8. With WAS 5.0.2 Network Deploy we were using ant (not ws_ant) to do deploys from the same box running the deployment manager. We simply dropped the wsanttasks.jar into our install of ant (ant/lib), and all of the standard WAS ant tasks were working -- only having to pass the correct parameters into the task APIs.
     
    We mainly used a separate install of ant instead of ws_ant to allow us flexibility in the version we use. We have never validated use of ant vs. ws_ant for remote installs or ant tasks other than those needed to build EJBs and start/stop/install/uninstall applications. It just worked for the scenario we were using, and we didn't investigate it any further.
     
    Now, with WAS 6.0.1.0, we have to do a bit more to make this same process work:
     
    1.) Copy both the wsanttasks.jar and the wsprofile.jar to the install of ant (ant/lib).
    2.) Set the ANT_OPTS environment variable to "-Duser.install.root=/<was-install-root>/profiles/<dm-profile-directory>"
     
    There are new runtime dependencies in the wsanttasks.jar to the wsprofile.jar, and the system property user.install.root must be set to the dm profile directory. It makes sense, considering the new concept of the profile in the WAS installation configuration. I guess it was decided to not change the ant task APIs, and instead pass the new needed information through a new system property.
     
    With those simple changes, our build/deploy process is now working as before for our scenario.

    So, you can use ws_ant, or your own install of ant (at least for the scenario I described).

    Sincerely,
    Doug Newton
  9. There is no wsanttasks.jar on websphere 7.So how can I solve this kind of issue?

     

    please help me !

    Thanks,

    Mani.

  10. Thanks for posting that script[ Go to top ]

    It was very helpful to me.
  11. Can some help how to write a Ant script to update the application as I do not want to uninstall and Install application.

    Thanks
  12. Ant WAS ADMIN tasks[ Go to top ]

    This thread has been very helpful, however I wanted to know few more things, if someone can help me that would be great.

    I am using WS6 and am using "wsejbdeploy" ANT task to generate WS deploy build outside WSAD. However I am getting
    same error as mentioned by Kumar and that is: "Unable to parse setupCmdLine: null\bin\setupCmdLine.bat"

    The replies are regarding doing ear ftp to the server and installing remotely. Is this error related to remote ftp/install or the set-up is missing something?

    Any help will be greatly appreciated!

    Thanks,
    CD

    Details of wsejbdeploy task url: http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/javadoc/ae/com/ibm/websphere/ant/tasks/WsEjbDeploy.html
  13. Ant WAS ADMIN tasks[ Go to top ]

    I got around this problem by using ejbdeploy instead of wsejbdeploy on EAR file.
  14. Ant WAS ADMIN tasks[ Go to top ]

    Hi,

    Even m getting the same error message.

    I am trying to deploy and EAR file into the WAS6.0.2.
    Getting error message.
    Unable to parse setupCmdLine.bat( the system cannot find the specified file.)

    Here is my code

    <target name="deploy">
    <ant antfile="xmls/appserver-websphere.xml" target="wsdeploy" >
                <property name="debug" value="true"/>
                <property name="classpath" value="${deploy.server.home}/appserver/lib/wsanttasks.jar;ant.jar;${deploy.server.home}/AppServer/lib/webservices.jar;"/>
                <property name="inputFile" value="file.ear"/>
                <property name="outputFile" value="output.ear"/>
                <property name="ignoreErrors" value="false"/>
                <property name="noValidate" value="false"/>
                <property name="trace" value="false"/>
                
                <property name="deploy.server.home" value="."/>
             </ant>
        </target>


        <target name="wsdeploy">

            <taskdef name="wsdeploy" classname="com.ibm.websphere.ant.tasks.WSDeploy">
                <classpath>
                    <pathelement path="wsanttasks.jar;webservices.jar;"/>
                </classpath>
            </taskdef>

            <ant antfile="xmls/appserver-websphere.xml" target="installEar" >
                   <!-- <property name="wasHome" value="${deploy.server.home}"/>
                        <property name="ear" value="file.ear"/>
                        <property name="profile" value="${deploy.server.home}/profiles/default/bin/setupCmdLine.bat"/>
                        <property name="conntype" value="SOAP"/>
                        <property name="host" value="localhost"/>
                        <property name="port" value="9060"/>-->
             </ant>
        </target>
        <target name="installEar">
            <taskdef name="wsInstallApp" classname="com.ibm.websphere.ant.tasks.InstallApplication">
                <classpath>
                    <pathelement path="${deploy.server.home}/lib/wsanttasks.jar;${deploy.server.home}/lib/wsprofile.jar;${deploy.server.home}/lib/bootstrap.jar"/>
                </classpath>
            </taskdef>
        
            <wsInstallApp
                ear="file.ear"
                wasHome="${deploy.server.home}"
                conntype="SOAP"
                host="localhost"
                port="9060"
               />

        </target>

    Thanks and Regards,
    Austin Carter
  15. Ant WAS ADMIN tasks[ Go to top ]

    Hi,Even m getting the same error message.I am trying to deploy and EAR file into the WAS6.0.2.Getting error message.Unable to parse setupCmdLine.bat( the system cannot find the specified file.) Here is my code<target name="deploy"><ant antfile="xmls/appserver-websphere.xml" target="wsdeploy" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="debug" value="true"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="classpath" value="${deploy.server.home}/appserver/lib/wsanttasks.jar;ant.jar;${deploy.server.home}/AppServer/lib/webservices.jar;"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="inputFile" value="file.ear"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="outputFile" value="output.ear"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="ignoreErrors" value="false"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="noValidate" value="false"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="trace" value="false"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="deploy.server.home" value="."/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</ant>&nbsp;&nbsp;&nbsp;&nbsp;</target>&nbsp;&nbsp;&nbsp;&nbsp;<target name="wsdeploy">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<taskdef name="wsdeploy" classname="com.ibm.websphere.ant.tasks.WSDeploy">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<classpath> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<pathelement path="wsanttasks.jar;webservices.jar;"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</classpath> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</taskdef>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<ant antfile="xmls/appserver-websphere.xml" target="installEar" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!-- <property name="wasHome" value="${deploy.server.home}"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="ear" value="file.ear"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="profile" value="${deploy.server.home}/profiles/default/bin/setupCmdLine.bat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="conntype" value="SOAP"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="host" value="localhost"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="port" value="9060"/>-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</ant>&nbsp;&nbsp;&nbsp;&nbsp;</target> &nbsp;&nbsp;&nbsp;&nbsp;<target name="installEar">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<taskdef name="wsInstallApp" classname="com.ibm.websphere.ant.tasks.InstallApplication">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<classpath> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<pathelement path="${deploy.server.home}/lib/wsanttasks.jar;${deploy.server.home}/lib/wsprofile.jar;${deploy.server.home}/lib/bootstrap.jar"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</classpath> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</taskdef>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<wsInstallApp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ear="file.ear"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wasHome="${deploy.server.home}"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;conntype="SOAP" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;host="localhost"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;port="9060"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/>&nbsp;&nbsp;&nbsp;&nbsp;</target>

    I have even tried to do the remote access but getting the FTPClient class not found exception.
    Thanks and Regards,Austin Carter
  16. Hi Austin and Kumar,
     
    It seems that your error is in the "profile", as Bill pointed out in the first reply.

    "wsInstallApp" is a wrapper around $AdminApp from WSADMIN. You need to pass in the parameter for the profile (e.g. profileDmgr). See the example below:



      <target name="install" depends="dist" description="Install application">
        <wsInstallApp
          wasHome="${washome}"
          ear="${earfile}"
          options="-cluster myCluster"
          profile="profileDmgr"
          conntype="SOAP"
          host="ip.address.of.the.was.admin.machine"
          port="8879"
        />
      </target>

  17. I was going through the post but didn't find any solution that would work for me. Here is the error that i am getting [wsadmin] java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError: javax/security/auth/Refreshable [wsadmin] at java.lang.ClassLoader.defineClass0(Native Method) [wsadmin] at java.lang.ClassLoader.defineClass(ClassLoader.java:703) [wsadmin] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:133) [wsadmin] at java.net.URLClassLoader.defineClass(URLClassLoader.java:320) [wsadmin] at java.net.URLClassLoader.access$400(URLClassLoader.java:93) [wsadmin] at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:678) [wsadmin] at java.security.AccessController.doPrivileged(Native Method) [wsadmin] at java.net.URLClassLoader.findClass(URLClassLoader.java:239) [wsadmin] at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:45) [wsadmin] at java.lang.ClassLoader.loadClass(ClassLoader.java:516) [wsadmin] at java.lang.ClassLoader.loadClass(ClassLoader.java:448) [wsadmin] at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:150) [wsadmin] at com.ibm.ws.scripting.CommonScriptingObject.connectToAdminService(CommonScriptingObject.java:117) [wsadmin] at com.ibm.ws.scripting.CommonScriptingObject.(CommonScriptingObject.java:99) [wsadmin] at com.ibm.ws.scripting.AdminControlClient.(AdminControlClient.java:154) [wsadmin] at com.ibm.ws.scripting.AbstractShell.createControlClient(AbstractShell.java:888) [wsadmin] at com.ibm.ws.scripting.AbstractShell.run(AbstractShell.java:1552) [wsadmin] at com.ibm.ws.scripting.WasxShell.main(WasxShell.java:827) [wsadmin] at java.lang.reflect.Method.invoke(Native Method) [wsadmin] at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:105)
  18. Ant WAS ADMIN tasks[ Go to top ]

    For various reasons, I wanted to use a standard ANT version   in order to automate EJB deployment from inside IDEA IntelliJ and found that the following appears to work, at least for me. Hopefully may help someone out:-

    1. Use the Java JDK that comes with WAS and not the standard Sun JDK (Set the JDK/JRE configuration to use <was_home>/java

    2. Add the following JAR onto the Ant classpath:-

    <was_home>/plugins/com.ibm.ws.runtime.jar

    3. Add the JVM option "-Duser.install.root=/opt/was/profiles/<profile_name_here>

    The above appears to work just fine for the basic <wsInstallApp> and <wsUninstallApp> custom Ant tasks.