Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

wsStartServer ANT task

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic