Anil Samuel wrote:
I edited my .ksh files to remove
[ -z "$CLASSPATH" ] &&
and it works just fine.
I'm sure it does, but if you then run these scripts several times without
un-setting the CLASSPATH in between, you will end up with a rather long and
messy CLASSPATH, which may cause unexpected errors down the road. Each
invocation of the setNetworkServerCP.ksh _adds_ derby.jar, derbytools.jar and
derbynet.jar to the CLASSPATH.
So you should
a) Check what your CLASSPATH is
echo $CLASSPATH
b) If the classpath mentions any of the derby jars serveral times, unset the
CLASSPATH
export CLASSPATH=
c) If you are using the startNetworkServer.ksh script to start the network
server, you need to set JAVA_HOME first, since the script uses this to
determine where your java installation is (and defaults to /usr/java, as
Øystein mentioned).
export JAVA_HOME=/usr/java/jdk1.5.0_04
(or whatever the path to the java installation you want to use is)
Alternatively, you can modify the script not to use JAVA_HOME, but a path of
your choice.
d) run the unmodified version of startNetworkServer.ksh (i.e., the one
including [ -z "$CLASSPATH" ] &&) when you want to start the network server.
--
John