|
From: Yasir K. <yas...@as...> - 2003-10-23 13:15:12
|
Hi,=20
I checked the following:
# ls -l
total 118
-rwxrwxrwx 1 root other 6151 Oct 23 12:16 TestApp
-rwxrwxrwx 1 root other 52548 Sep 11 13:07 wrapper
# TestApp=20
TestApp: not found
# TestApp console
TestApp: not found
# ./TestApp console
./TestApp: not found
# cd ..
# ls -l
total 1804
drwxr-xr-x 2 root other 512 Oct 23 12:23 bin
drwxr-xr-x 2 root other 512 Oct 23 12:19 conf
drwxr-xr-x 5 root other 512 Oct 23 12:16 lib
drwxr-xr-x 4 root other 512 Oct 22 18:12 logs
drwxr-xr-x 2 root other 512 Oct 22 18:10 misc
-rw-r--r-- 1 root other 512 Aug 27 17:11 TestApp.sh
# bin/TestApp console
bin/TestApp: not found
# ./bin/TestApp console
./bin/TestApp: not found
The error shows that shell is unable to find the script file, but why =
... if it is present there .... ??
>>> Here is a part of TestApp script that I modified is quoted
#! /bin/sh# Skeleton sh script suitable for starting and stopping # =
wrapped Java apps on the Solaris platform. # Make sure that PIDFILE =
points to the correct location,# if you have changed the default =
location set in the # wrapper configuration =
file.#-------------------------------------------------------------------=
----------# These settings can be modified to fit the needs of your =
application
# ApplicationAPP_NAME=3D"TestApp"APP_LONG_NAME=3D"My Test Application"
# WrapperWRAPPER_CMD=3D"./wrapper"WRAPPER_CONF=3D"./conf/wrapper.conf"
# Priority at which to run the wrapper. See "man nice" for valid =
priorities.# nice is only used if a priority is specified.PRIORITY=3D
# Location of the pid file.PIDDIR=3D"./"
# Do not modify anything beyond this =
point#-------------------------------------------------------------------=
----------
>>> Here is some part of wrapper.conf file ..
#********************************************************************# =
Wrapper =
Properties#**************************************************************=
******# Java Applicationwrapper.java.command=3Djava
# Java Main class. This class must implement the WrapperListener =
interface# or guarantee that the WrapperManager class is initialized. =
Helper# classes are provided to do this for you. See the Integration =
section# of the documentation for details.# (For method-1 uncomment the =
following line) =
#wrapper.java.mainclass=3Dorg.tanukisoftware.wrapper.WrapperSimpleApp# =
(For method-2 uncomment the following line) =
wrapper.java.mainclass=3Dorg.tanukisoftware.wrapper.WrapperStartStopApp
# Java Classpath (include wrapper.jar) Add class path elements as# =
needed starting from =
1wrapper.java.classpath.1=3D../lib/wrapper.jarwrapper.java.classpath.2=3D=
../lib/MyApp.jar
# Java Library Path (location of Wrapper.DLL or =
libwrapper.so)wrapper.java.library.path.2=3D../lib
# Java Additional Parameters#wrapper.java.additional.1=3D
# Initial Java Heap Size (in MB)wrapper.java.initmemory=3D3
# Maximum Java Heap Size (in MB)wrapper.java.maxmemory=3D64
# Add parameters as needed starting from 1# Application start =
parameters. =
wrapper.app.parameter.1=3DTestAppMainwrapper.app.parameter.2=3D2wrapper.a=
pp.parameter.3=3Dfalsewrapper.app.parameter.4=3D1# Application stop =
parameters. =
wrapper.app.parameter.5=3DTestAppMainwrapper.app.parameter.6=3Dfalsewrapp=
er.app.parameter.7=3D1wrapper.app.parameter.8=3Dstop
..........................................
Any ideas from the above provided information .. ? Please keep in mind I =
am using Solaris 8 on SunBlade 100.=20
Thanx.
Yasir Khan
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Date: Thu, 23 Oct 2003 10:10:30 +0900
From: Leif Mortenson <le...@ta...>
To: wra...@li...
Subject: Re: [Wrapper-user] Unable to run script on Solaris 8
Reply-To: wra...@li...
Yasir,
It looks like you have set everything up correctly.
> 1- wrapper
> 2- TestApp (it is the script file 'sh.script.in' that is renamed, I=20
> changed the values for APP_NAME & APP_LONG_NAME)
execute the following to verify that the executable x bit is set for=20
both wrapper and TestApp.
# ls -al
> Now when I try to run my application by following command (current=20
> directory is bin):=20
> =20
> #TestApp console
> =20
> I got the following output:
> =20
> TestApp: not found
This is an error from the shell and has absolutely nothing to do with=20
the Wrapper.
When you execute a script that is located in the current directory on=20
UNIX systems.
(Or any command not on the path)
you must specify the location of the script. Since you are in the bin=20
directory
execute the command as follows:
# ./TestApp console
> On the other hand if I try to run my application using following=20
> command written in another script file (runApp.sh) , it works fine:
> =20
> java -cp TestApp.jar TestAppMain=20
This works because the java executable is most likely located on your =
PATH.
If that was not the problem, write back,
Cheers,
Leif
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Date: Wed, 22 Oct 2003 10:10:30 +0900
From: "Yasir Khan" <yas...@as...>
To: <wra...@li...>
Date: Wed, 22 Oct 2003 19:27:31 +0500
Organization: Ascertia Limited.
Subject: [Wrapper-user] Unable to run script on Solaris 8
Hi,
After successful integration of Java Service Wrapper on Windows OS using =
method-2, now I am trying to run my application using wrapper on Solaris =
8. But something strange is happening i.e. I copied the following files =
in my application's bin directory and change the permissions to =
executable:
1- wrapper
2- TestApp (it is the script file 'sh.script.in' that is renamed, I =
changed the values for APP_NAME & APP_LONG_NAME)
Secondly I copied the following files in my application's lib directory:
1- wrapper.jar
2- libwrapper.so
Finally I copied the wrapper.conf to my application's conf directory (I =
changed the entries in wrapper.conf file according to documentation)
Now when I try to run my application by following command (current =
directory is bin):=20
#TestApp console=20
I got the following output:
TestApp: not found
On the other hand if I try to run my application using following command =
written in another script file (runApp.sh) , it works fine:
java -cp TestApp.jar TestAppMain =20
where:
TestAppMain is the main class of my application
I couldn't figure out why the TestApp script is not running? Any ideas =
what could be wrong ... ?
Best Regards,
Yasir Khan
|