|
From: Yasir K. <yas...@as...> - 2003-10-23 08:21:37
|
Hi,=20
=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 a part of TestApp script that I modified is quoted
#! /bin/sh
# Skeleton sh script suitable for starting and stopping=20
# wrapped Java apps on the Solaris platform.=20
# Make sure that PIDFILE points to the correct location,
# if you have changed the default location set in the=20
# wrapper configuration file.
#------------------------------------------------------------------------=
-----
# These settings can be modified to fit the needs of your application
# Application
APP_NAME=3D"TestApp"
APP_LONG_NAME=3D"My Test Application"
# Wrapper
WRAPPER_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 PRIORITY=3D
# Location of the pid file.
PIDDIR=3D"./"
# Do not modify anything beyond this=20
#------------------------------------------------------------------------=
-----
>>>> Here is some part of wrapper.conf file ..
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.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)=20
#wrapper.java.mainclass=3Dorg.tanukisoftware.wrapper.WrapperSimpleApp
# (For method-2 uncomment the following line)=20
wrapper.java.mainclass=3Dorg.tanukisoftware.wrapper.WrapperStartStopApp
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=3D../lib/wrapper.jar
wrapper.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=3DTestAppMain
wrapper.app.parameter.2=3D2
wrapper.app.parameter.3=3Dfalse
wrapper.app.parameter.4=3D1
# Application stop parameters. wrapper.app.parameter.5=3DTestAppMain
wrapper.app.parameter.6=3Dfalse
wrapper.app.parameter.7=3D1
wrapper.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
=20
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,
=20
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:
=20
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)
=20
Secondly I copied the following files in my application's lib directory:
=20
1- wrapper.jar
2- libwrapper.so
=20
Finally I copied the wrapper.conf to my application's conf directory (I =
changed the entries in wrapper.conf file according to documentation)
=20
Now when I try to run my application by following command (current =
directory is bin):=20
=20
#TestApp console=20
=20
I got the following output:
=20
TestApp: not found
=20
On the other hand if I try to run my application using following command =
written in another script file (runApp.sh) , it works fine:
=20
java -cp TestApp.jar TestAppMain =20
=20
where:
TestAppMain is the main class of my application
=20
I couldn't figure out why the TestApp script is not running? Any ideas =
what could be wrong ... ?
=20
Best Regards,
Yasir Khan
|