RTC and Websphere Jython scripts error
I am following the documentation for installing RTC using Websphere (http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0/index.jsp) but when I tried to use Jython script for configure websphere it doesn't work.
I am in the part of documentation:
Installing / Installing the Rational solution for CLM / Deploying and starting the server / Deploying and starting WebSphere Application Server / Administering WebSphere Application Server by using Jython / Setting up a WebSphere application Server
For now I did:
1. Install RTC
2. Install DB2
2.2 Create DB for QM, JTS, etc...
3. Install WebSphere
Error that I get (Output):
Steps:
1. I create a profile from Profile Management Tool (Environment: Applicaton Server): "AppSrv03"
2. Start server
3. Open cmd:
3.1 cd C:\Program Files\IBM\WebSphere\AppServer\bin
3.2 Input command: wsadmin.bat -lang jython -profileName AppSrv03 -user myuser -password mypass -f C:\Progra~1\IBM\JazzTeamServer\server\was\clm_was_config.py C:\Progra~1\IBM\JazzTeamServer\conf
I am using:
WebSphere 7.0.0.23
I am in the part of documentation:
Installing / Installing the Rational solution for CLM / Deploying and starting the server / Deploying and starting WebSphere Application Server / Administering WebSphere Application Server by using Jython / Setting up a WebSphere application Server
For now I did:
1. Install RTC
2. Install DB2
2.2 Create DB for QM, JTS, etc...
3. Install WebSphere
Error that I get (Output):
WASX7209I: Connected to process "server1" on node vmuseridxxxNode03 using SOAP connector; The type of process is: UnManagedProcess
WASX7487E: Failed to import script libraries modules: C:\Program Files\IBM\WebSphere\AppServer\scriptLibraries\perfTuning\V70\
applyPerfTuningTemplate.py; Examine the wsadmin log file to determine the problem.
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the
argv variable: "[C:\Progra~1\IBM\JazzTeamServer\conf]"
Disabled Java2 Security
Enabled Application Security
Enabled Administrative Security
Enabled Unprotected URI
Setting configuration for Application Server server1
Set initial and max heap size to 4096
Set JVM args -Xmx1200m
WASX7017E: Exception received while running file "C:\Progra~1\IBM\JazzTeamServer\server\was\clm_was_config.py"; exception info
rmation: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 315, in ?
IndexError: index out of range: 2
WASX7341W: No "save" was performed before the interactive scripting session exited; configuration changes will not be saved.
Steps:
1. I create a profile from Profile Management Tool (Environment: Applicaton Server): "AppSrv03"
2. Start server
3. Open cmd:
3.1 cd C:\Program Files\IBM\WebSphere\AppServer\bin
3.2 Input command: wsadmin.bat -lang jython -profileName AppSrv03 -user myuser -password mypass -f C:\Progra~1\IBM\JazzTeamServer\server\was\clm_was_config.py C:\Progra~1\IBM\JazzTeamServer\conf
I am using:
WebSphere 7.0.0.23
4 answers
Edit:
It seems that using language instead of lang makes the difference.
So running wsadmin.bat -language jython ..... returns
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[-language, jython, C:/OPT/IBM/RTC/40forWAS/server/conf]"
Where
running wsadmin.bat -lang jython ..... returns
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[C:/OPT/IBM/RTC/40forWAS/server/conf]"
Note using lang works as I have a number of scripts that use it that way. It just seems to change what arguments get passed into the script. So my previous workaround should also work.
Previous comment:
Based on the error: IndexError: index out of range: 2
And the line of code that the error points to
File "<string>", line 315, in ? which equals appcontextconfPath = "file:///"+ sys.argv[2] in the py file. It looks like there are 3 arguments required to run the script.
But based on the admin guide and the usage statement you appear to be running it correctly with only one.
Try adding in two bogus arguments before the one pointing to the conf directory.
i.e -f
<path>\clm_was_config.py null null C:\Progra~1\IBM\JazzTeamServer\conf
I'll haven't used these scripts specifically so I'll try to test out them out later today or tomorrow as time permits.
Comments
run the command from the profile bin directory and not App Server bin
In you case its possibly
C:\IBM\WebSphere\AppServer\profiles\AppSrv03\bin
which removes the params
profileName <value>
and that should make the script pick the values rightly
hope it helps
In you case its possibly
C:\IBM\WebSphere\AppServer\profiles\AppSrv03\bin
which removes the params
profileName <value>
and that should make the script pick the values rightly
hope it helps
Comments
Use Forward slashes "/" instead of backward slash "\" when mentioning any path throughout in the command line.
Also if you have multiple profiles, I would add "-profileName <profilename>" param in the command or run the command from the <profilename>/bin (which Dinnesh also pointed) otherwise your command will fire against the default profile as set in WAS.
And if you still get the error, please post back.
Oops it looks like I have missed reading one of your old posts. :-)
Assuming you are trying this in a test environment, you can try the following but take precautions as necessary.
Take a backup of the .py file. Then open it with windows notepad (I would recommend that as other text editors can do harm)
Change the line appcontextconfPath = "file:///"+ sys.argv[2] to appcontextconfPath = "file:///"+ sys.argv[0] and save it and run the command.
Hope this might help!
Assuming you are trying this in a test environment, you can try the following but take precautions as necessary.
Take a backup of the .py file. Then open it with windows notepad (I would recommend that as other text editors can do harm)
Change the line appcontextconfPath = "file:///"+ sys.argv[2] to appcontextconfPath = "file:///"+ sys.argv[0] and save it and run the command.
Hope this might help!
Comments
Karl Weinert
JAZZ DEVELOPER Oct 17 '12, 11:55 a.m.Francisco Burgos
Oct 18 '12, 3:49 a.m.