Remote Deploy to Websphere – Should it be that difficult?

Second Post is here

Third post is here

In an effort to ease our deployment cycle, I’ve been trying to develop simple ANT scripts to deploy to a remote server

running Websphere 6.0.
To my joy, I found that IBM was kind enough to provide ANT tasks that take care of the deployment (wsInstall, wsadmin) [Poor me: I thought this has to be well documented].

<wsInstallApp ear="${earfile}" host="${ipaddress}" conntype="SOAP" port="8880" wasHome="${washome}" />

After trying out the task. Nothing seems to be working:

Unable to parse setupCmdLine: null\bin\setupCmdLine.bat (The handle is invalid.) The java class is not found: com/ibm/ws/bootstrap/WSLauncher

There seems to be some misguidance about where this task should be running (a build/local machine, or a remote one)


After digging more, I decided to head another way. Trying out some sample script .Jacl files.

Straight from an archived pdf file

Remote base server deployment:
[A funny part] If you install webSphere Application Server on the build machine, then the WebSphere Application Server runtime and its wsadmin command tool are available, even if that installation server is never configured or started.

So, this means that I just have to install the Whole Application Server in order to make use of the wsadmin tool – how about those licensing fees?

[Even funnier] Note: The above solution for remote base server deployment only works if both the remote and local installation (where wsadmin is running) are WebSphere version-6 installations. If either of the installations is a WebSphere
version-5.0 or version-5.1 installation then you will get an error “X:\MyTEMP\appnnnnn.ear does not exist for installation”.
Base server (non-managed) Remote File Transfer support is a version-6 enhancement, unfortunately the version-5x error is not clear about that.

[This was straight out of their pdf file – I swear, I haven’t edited it :-)]

Making note of those notes, I did the following using ANT:

  • Generate the .ear file.
  • Run a batch file I found with Rational Application Developer base runtime (isn’t that the runtime IBM was talking about

when mentioning the “Websphere Application Server Runtime” – If so, why haven’t they said that?).

{% highlight xml %}

<exec dir=”${rationalhome}” executable=”cmd” os=”Windows XP”> <arg line=”/c wsadmin.bat -conntype SOAP -host -port 8880 -lang jython -c “AdminApp.install c:/TestEAR.ear’, ‘-nopreCompileJSPs default_host -verbose’)””/> </exec\> {% endhighlight %} Now, I’m getting: `..IWAE0022E Exception occurred loading deployment descriptor for module …` Googling for the error – [I found that]( > PQ98556: WEBSPHERE V6.0 DOES NOT HAVE BACKWARD COMPATABILITY WITH 2.3 SERVLET SPEC. ONLY OPERATES WITH 2.4 SERVLET SPEC. > Error description > PROBLEM DESCRIPTION: Application Server 6.0 does not have full backwards compatibility with the 2.3 servlet specification. **LATER:** The reason for this error was that the generated .ear file (from ANT task) is different than that generated via the “export ear” from within RAD. It seems I’m missing out on some orientation to IBM developer-nonfriendly-opensource-turned-proprietary products (Websphere Application Server, Application Developer, etc…). I will later update the post with my latest adventures in websphere land – wish me luck. > Migrated Comment by salman khattak on June 15, 2006: > Could not agree more !!!