Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Websphere and the fly likes wsStartServer ANT task Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "wsStartServer ANT task " Watch "wsStartServer ANT task " New topic
Author

wsStartServer ANT task

C Wagner
Greenhorn

Joined: Jun 20, 2005
Posts: 3
I'm trying to run an ANT task that will start an instance of the websphere server. I want to run the task from within WSAD 5.1.2 (run ANT). The wsStartServer ANT task fails. The server log shows an incorrect java version (1.3.1) and incorrect Java Home (eclipse/jre) . When I use the startServer.bat, the correct Java version (1.4.1) and
Java Home ( runtimes\base_v51\java\jre ).

Any ideas on how to set the proper versions ??



Ant script:
<?xml version="1.0" encoding="UTF-8"?>
project name="InContainerTestRpt" default="main" basedir="..">
property file="${basedir}/test-scripts/server.properties" />

< !-- MAIN TARGET -->
target name="main">
antcall target="init" />
antcall target="startserver" />
/target>


taskdef name="wsStartServer" classname="com.ibm.websphere.ant.tasks.StartServer"/>
target name="init">
tstamp/>
echo message="--- ${ant.project.name} started at ${TSTAMP} on ${TODAY} ---"/>
echo>WasRoot ${wasroot}</echo>
echo>${ant.version}</echo>
echo>Java ${ant.java.version}</echo>
echo> ${ws.ext.dirs}</echo>

/target>

< !-- Start Server -->
target name="startserver" depends="init" description="Starts the server">
echo message="--- Starting Server ---"/>
wsStartServer server="${servername}"
trace="true"
wasHome="${wasroot}"/>
echo message="--- Server Started---"/>
/target>
/project-->


Beginning of the server log when using the ANT script :

************ Start Display Current Environment ************
Host Operating System is Windows XP, version 5.1
Java version = J2RE 1.3.1 IBM Windows 32 build cn131-20031021 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
was.install.root = C:\program Files\ibm\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51
user.install.root = null
Java Home = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\eclipse\jre
ws.ext.dirs = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\java\lib;C:\program Files\ibm\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\classes;C:\program Files\ibm\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib;C:\program Files\ibm\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\ext;C:\program Files\ibm\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\web\help;C:\program Files\ibm\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\deploytool\itp\plugins\com.ibm.etools.ejbdeploy\runtime;C:\Program Files\IBM\WebSphere MQ\lib
Classpath = C:\program Files\ibm\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\properties;C:\program Files\ibm\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\bootstrap.jar;C:\program Files\ibm\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\j2ee.jar;C:\program Files\ibm\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\lmproxy.jar;C:\program Files\ibm\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\urlprotocols.jar
Java Library path = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\eclipse\jre\bin;.;C:\WINNT\System32;C:\WINNT;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\eclipse\jre\bin;C:\PROGRA~1\FileNET\IDM;C:\WINNT\system32;C:\WINNT;c:\progra~1\Merant\DIMENS~1\8.0\PROG;C:\Program Files\Host Integration Server\system;C:\WINNT\System32\Wbem;%PRODDIR%\ISS;C:\PROGRAM FILES\THINKPAD\UTILITIES;C:\PROD\ISS;C:\PROGRAM FILES\RUMBA\SYSTEM;C:\DOCUMENTS AND SETTINGS\ALL USERS\APPLICATION DATA\NOTES;C:\PROGRAM FILES\NOTES;C:\Program Files\VSEW310;C:\Program Files\VSEW310\Lib;C:\Program Files\VSEW310\qelib;C:\PROGRA~1\DB2\IBM\IMNNQ;C:\Program Files\Common Files\Compuware\NMShared;C:\PROGRA~1\COMMON~1\COMPUW~1;C:\PROGRA~1\COMPUW~1\XPDev\BINW;C:\Program Files\IBM\IBM CICS Transaction Gateway\BIN;C:\Program Files\Compuware\DevPartner Java Edition\bin;C:\PROGRA~1\DB2\SQLLIB\BIN;C:\PROGRA~1\DB2\SQLLIB\FUNCTION;C:\PROGRA~1\DB2\SQLLIB\SAMPLES\REPL;C:\PROD\WSD\SMSNomad\;C:\Program Files\Rational\common;c:\java\jdk142\bin;C:\Program Files\Rational\ClearCase\bin;C:\Program Files\HEWLETT-PACKARD\CLIENT\bin;C:\java\jwsdp\jwsdp-shared\bin;C:\PROGRA~1\FileNET\IDM;C:\WINNT\system32;C:\WINNT;c:\progra~1\Merant\DIMENS~1\8.0\PROG;C:\Program Files\Host Integration Server\system;C:\WINNT\System32\Wbem;%PRODDIR%\ISS;C:\PROGRAM FILES\THINKPAD\UTILITIES;C:\PROD\ISS;C:\PROGRAM FILES\RUMBA\SYSTEM;C:\DOCUMENTS AND SETTINGS\ALL USERS\APPLICATION DATA\NOTES;C:\PROGRAM FILES\NOTES;C:\Program Files\VSEW310;C:\Program Files\VSEW310\Lib;C:\Program Files\VSEW310\qelib;C:\PROGRA~1\DB2\IBM\IMNNQ;C:\Program Files\Common Files\Compuware\NMShared;C:\PROGRA~1\COMMON~1\COMPUW~1;C:\PROGRA~1\COMPUW~1\XPDev\BINW;C:\Program Files\IBM\IBM CICS Transaction Gateway\BIN;C:\Program Files\Compuware\DevPartner Java Edition\bin;C:\PROGRA~1\DB2\SQLLIB\BIN;C:\PROGRA~1\DB2\SQLLIB\FUNCTION;C:\PROGRA~1\DB2\SQLLIB\SAMPLES\REPL;C:\PROD\WSD\SMSNomad\;C:\Program Files\Rational\common;c:\java\jdk142\bin;C:\Program Files\Rational\ClearCase\bin;C:\Program Files\HEWLETT-PACKARD\CLIENT\bin;C:\Program Files\VS60\Common\Tools\WinNT;C:\Program Files\VS60\Common\MSDev98\Bin;C:\Program Files\VS60\Common\Tools;C:\Program Files\VS60\VC98\bin
Current trace specification = com.ibm.*=all=enabled
************* End Display Current Environment *************

Beginning of the server log when using startServer.bat :

************ Start Display Current Environment ************
Host Operating System is Windows XP, version 5.1
Java version = J2RE 1.4.1 IBM Windows 32 build cn1411-20031011 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
was.install.root = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51
user.install.root = null
Java Home = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\java\jre
ws.ext.dirs = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\java\lib;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\classes;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\ext;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\web\help;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\deploytool\itp\plugins\com.ibm.etools.ejbdeploy\runtime;C:\Program Files\IBM\WebSphere MQ\lib
Classpath = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\properties;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\bootstrap.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\j2ee.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\lmproxy.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\urlprotocols.jar
Java Library path = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\java\bin;.;C:\WINNT\System32;C:\WINNT;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\java\bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\java\jre\bin;C:\PROGRA~1\FileNET\IDM;C:\WINNT\system32;C:\WINNT;c:\progra~1\Merant\DIMENS~1\8.0\PROG;C:\Program Files\Host Integration Server\system;C:\WINNT\System32\Wbem;%PRODDIR%\ISS;C:\PROGRAM FILES\THINKPAD\UTILITIES;C:\PROD\ISS;C:\PROGRAM FILES\RUMBA\SYSTEM;C:\DOCUMENTS AND SETTINGS\ALL USERS\APPLICATION DATA\NOTES;C:\PROGRAM FILES\NOTES;C:\Program Files\VSEW310;C:\Program Files\VSEW310\Lib;C:\Program Files\VSEW310\qelib;C:\PROGRA~1\DB2\IBM\IMNNQ;C:\Program Files\Common Files\Compuware\NMShared;C:\PROGRA~1\COMMON~1\COMPUW~1;C:\PROGRA~1\COMPUW~1\XPDev\BINW;C:\Program Files\IBM\IBM CICS Transaction Gateway\BIN;C:\Program Files\Compuware\DevPartner Java Edition\bin;C:\PROGRA~1\DB2\SQLLIB\BIN;C:\PROGRA~1\DB2\SQLLIB\FUNCTION;C:\PROGRA~1\DB2\SQLLIB\SAMPLES\REPL;C:\PROD\WSD\SMSNomad\;C:\Program Files\Rational\common;c:\java\jdk142\bin;C:\Program Files\Rational\ClearCase\bin;C:\Program Files\HEWLETT-PACKARD\CLIENT\bin;C:\java\jwsdp\jwsdp-shared\bin;C:\PROGRA~1\FileNET\IDM;C:\WINNT\system32;C:\WINNT;c:\progra~1\Merant\DIMENS~1\8.0\PROG;C:\Program Files\Host Integration Server\system;C:\WINNT\System32\Wbem;%PRODDIR%\ISS;C:\PROGRAM FILES\THINKPAD\UTILITIES;C:\PROD\ISS;C:\PROGRAM FILES\RUMBA\SYSTEM;C:\DOCUMENTS AND SETTINGS\ALL USERS\APPLICATION DATA\NOTES;C:\PROGRAM FILES\NOTES;C:\Program Files\VSEW310;C:\Program Files\VSEW310\Lib;C:\Program Files\VSEW310\qelib;C:\PROGRA~1\DB2\IBM\IMNNQ;C:\Program Files\Common Files\Compuware\NMShared;C:\PROGRA~1\COMMON~1\COMPUW~1;C:\PROGRA~1\COMPUW~1\XPDev\BINW;C:\Program Files\IBM\IBM CICS Transaction Gateway\BIN;C:\Program Files\Compuware\DevPartner Java Edition\bin;C:\PROGRA~1\DB2\SQLLIB\BIN;C:\PROGRA~1\DB2\SQLLIB\FUNCTION;C:\PROGRA~1\DB2\SQLLIB\SAMPLES\REPL;C:\PROD\WSD\SMSNomad\;C:\Program Files\Rational\common;c:\java\jdk142\bin;C:\Program Files\Rational\ClearCase\bin;C:\Program Files\HEWLETT-PACKARD\CLIENT\bin;C:\Program Files\VS60\Common\Tools\WinNT;C:\Program Files\VS60\Common\MSDev98\Bin;C:\Program Files\VS60\Common\Tools;C:\Program Files\VS60\VC98\bin
Current trace specification = *=all=disabled
************* End Display Current Environment *************


[ July 08, 2005: Message edited by: C Wagner ]

[ July 08, 2005: Message edited by: C Wagner ]
[ July 08, 2005: Message edited by: C Wagner ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wsStartServer ANT task
 
Similar Threads
Problem starting WTE in WSAD 5.0.1
How to set DB2 classpath in WSAD?
SimpleTagSupport compile error
JVM crashed
Please Help!. Having problem starting Server in WSAD5.0