tags:

views:

512

answers:

3

Hi All,

I am trying to run wsInstallApp task to deploy my war file into websphere. I am getting the error "Unable to parse setupCmdLine: null\bin\setupCmdLine.bat (The system cannot find the path specified.)"

<property name="ear.file" value="../archive/DocProcessing.war" />
There is no attribute for war

Here is the code SNIPPET:
<target name="init">
<path id="lib.ref">
<fileset dir="${env.classpath.WAS_HOME}\lib">
      <include name="*.*jar" />
</fileset>
<fileset dir="${env.classpath.WAS_HOME}\bin">
      <include name="*.*bat" />
     </fileset>
     <fileset dir="${env.classpath.WAS_HOME}\plugins">
      <include name="*.*jar" />
     </fileset>
     <fileset dir="${env.classpath.WAS_HOME}\java\lib">
      <include name="*.*jar" />
     </fileset>
     <fileset dir="${env.classpath.WAS_HOME}\deploytool\itp\plugins">
      <include name="*.*jar" />
     </fileset>
     <fileset dir="${env.classpath.WAS_HOME}">
      <include name="*.*jar" />
     </fileset>
      </path>
    <taskdef name="wsStartServer" classpathref="lib.ref"
     classname="com.ibm.websphere.ant.tasks.StartServer" />
    <taskdef name="wsInstallApp" classpathref="lib.ref"
     classname="com.ibm.websphere.ant.tasks.InstallApplication" />

</target>

<target name="StartServer" depends="init">
    <exec dir="${env.classpath.WAS_HOME}\bin" executable="cmd">
     <arg line="/c startServer.bat server1 -profileName AppSrv01" />
    </exec>
</target>
<target name="installEar" depends="StartServer">
    <echo message="EAR File located: ${ear.file}" />
    <wsInstallApp ear="${ear.file}" wasHome="${env.classpath.WAS_HOME}"
     conntype="${remoteConnType}" host="${remoteHostName}" user="${remoteUserId}"
     password="${remotePassword}" />
</target>


properties set are:

<property name="remoteHostName" value="localhost" />
<property name="remoteConnType" value="SOAP" />
<property name="remotePort" value="8880" />
<property name="remoteUserId" value="wasadmin" />
<property name="remotePassword" value="wasadmin" />

path set for wasHome ="C:\Program Files\IBM\WebSphere\AppServer"

I could not findout what is wrong in this .Though i am new to websphere i am trying to find out the solution to install application and start application using ant script .Please kindly provide me the solution to get it set right .

Thanx in advance

A: 

This process most probably runs ws_ant.bat which in turn calls setupcmdline to initialise all the variables. In my installation the line is like this:

@echo off
@setlocal
call "%~dp0setupCmdLine.bat" %*

Could it be something to do with your server/RAD configuration being invalid, or the project not having a default server assigned to it?

What happens when you run it outside of RAD through the command line, does it still fail in the same way?

Michael Ransley
A: 

You have to set 'user.install.root' property, here is an example:

<property name="user.install.root" value="${env.classpath.WAS_HOME}/profiles/was60profile1" />
Benoit Guerout
A: 

More information from IBM Support here: http://www-01.ibm.com/support/docview.wss?rs=180&amp;uid=swg1PK23265

Davanum Srinivas - dims