I want to write a CGI script for Jython for websphere application server task. The CGI script required shebang where in I need to give jython file path. I have WAS 8.5 and I couldnt fine the jython jar anywhere . where in Jython jar in WAS home directory.
Your cgi script would have to invoke jython scripts from wsadmin, as in the following example.
wsadmin -lang jython -f 'c:/temp/script/test1.py'
It would be best to call specific files from within a script, rather than just simply command line arguments. Keep in mind that each time you invoke wsadmin from within a script it will fire up a separate JVM, which can be very cpu intensive. So it is best to put most logic in external scripts and then call the few .py scripts separately from inside the cgi script.
wsadmin is located in
profiles/<profile_name>/bin
Rerefence:
Jython Infocenter Info
Related
I'm bundling a file to be accessed by BeforeInstall shell script file. But shell script file cannot locate the file. I tried bundling in the same folder as script file. Still not working. It gives No such file or directory
bundle
scripts
beforeInstall.sh
file.properties
May I know if this is possible...
The files are not placed in the locations you have specified yet during the BeforeInstall step. At that point the zip has only been downloaded to a default location, so the file path in your script probably doesn't exist yet.
What do you want your script to do? Would running it during the AfterInstall step work?
I have created a shell script to start ServiceMix by calling bin/start but it is not starting when it is built from Jenkins. From console it works fine.
Try to use bin/servicemix instead of bin/start on your custom shell script
There are lots of build-in resources in Serverspec, but I want to extend it to my own needs. In InSpec it support script resource which will run the PowerShell script and get the result it seems.
But InSpec is too slow. Is there any equivalent to script resource in Serverspec exists? It is running PowerShell script in the backend for each resource. How to write my own PowerShell script and call it via Serverspec?
I have got a jmeter test that needs to run a shell script before it can start. The shell script lays in the directory of the jmx file. I use an OS Process Sampler to invoke the script, but the working directory is set to the bin/ folder of apache jmeter, and thus causing an error.
Is there a property for the current directory where my jmx testplan is?
apache jmeter 2.8
on ubuntu 12.04
The way to to it :
Add a User Defined Variables called shellDir with value ${__P(shellDir,default folder)}
Use it in your path as ${shellDir}/
Define this property at startup using -JshellDir=
See:
http://jmeter.apache.org/usermanual/get-started.html
I run the following command on my AIX machine.
/usr/java6_64/jre/bin/java -jar myapp.jar
Then, things look fine. The JAR file connects to the database and does whatever it needs to do.
But I need to put this command (plus a few others) in a script.
So I created a KornShell (ksh) script file called "script.ksh" to do the above.
#!/bin/ksh
/usr/java6_64/jre/bin/java -jar myapp.jar
But it is giving me the following exception:
EXCEPTION: TerminateProcessException: Cannot connect to the database.
java.sql.SQLException: No suitable driver
Now, there is a "lib" folder in the same location as the JAR file and script.ksh file where the JDBC driver is located.
Is there something I am missing in the shell script? Like classpath? I tried setting the classpath in the script with
CLASSPATH=/home/path/to/lib/*.jar
But it still gave me the error. Looks like it can't find the driver. Any help?
Try exporting the CLASSPATH variable.