Hi Anthos:
>1. Are you using the .ksh from db-derby-10.1.2.1-bin/frameworks/NetworkServer/bin/ ?
yes
>2. somehow derbynet.jar is missing in your classpath which is why this error.
I've added derbynet.jar to the classpath in the script. The downloaded one had that
file missing as you can see from attachment "downloaded_setNetworkClientCP.ksh".

Yesterday everything was fine but today I cannot start the server using the modified
scripts (all 8 attached) and either as user dan or root. Please see below.
/dan
"
[EMAIL PROTECTED] ~]$ cd $DERBY_INSTALL/frameworks/NetworkServer/bin
[EMAIL PROTECTED] bin]$ ./setNetworkClientCP.ksh
CLASSPATH=/home/dan/DerbyInstall/lib/derby.jar:/home/dan/DerbyInstall/lib/derbytools.jar:/home/dan/DerbyInstall/lib/derbynet.jar:
/home/dan/mysql-connector-java-3.1.10.tar.gz_FILES/mysql-connector-java-3.1.10/mysql-connector-java-3.1.10-bin.jar:
/home/dan/mysql-connector-java-3.1.10.tar.gz_FILES/mysql-connector-java-3.1.10/mysql-connector-java-3.1.10-bin-g.jar
[EMAIL PROTECTED] bin]$ ./startNetworkServer.ksh
2006-04-06 09:03:28.164 GMT Thread[main,5,main] java.io.FileNotFoundException: derby.log (Permission denied)
Could not listen on port 1527 on host localhost.
Could not listen on port 1527 on host localhost.
[EMAIL PROTECTED] bin]$ su
Password:
[EMAIL PROTECTED] bin]# $ cd $DERBY_INSTALL/frameworks/NetworkServer/bin
bash: $: command not found
[EMAIL PROTECTED] bin]# cd /home/dan/DerbyInstall/frameworks/NetworkServer/bin
[EMAIL PROTECTED] bin]#  ./setNetworkClientCP.ksh
CLASSPATH=/home/dan/DerbyInstall/lib/derby.jar:/home/dan/DerbyInstall/lib/derbytools.jar:/home/dan/DerbyInstall/lib/derbynet.jar:/home/dan/mysql-connector-java-3.1.10.tar.gz_FILES/mysql-connector-java-3.1.10/mysql-connector-java-3.1.10-bin.jar:/home/dan/mysql-connector-java-3.1.10.tar.gz_FILES/mysql-connector-java-3.1.10/mysql-connector-java-3.1.10-bin-g.jar
[EMAIL PROTECTED] bin]#  ./startNetworkServer.ksh
Could not listen on port 1527 on host localhost.
[EMAIL PROTECTED] bin]# echo $PATH
/usr/kerberos/sbin:/usr/java/jdk1.5.0_04/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/dan/bin
[EMAIL PROTECTED] bin]# echo $DERBY_INSTALL
/home/dan/DerbyInstall
[EMAIL PROTECTED] bin]#
"




--- Begin Message --- 1. Are you using the .ksh from db-derby-10.1.2.1-bin/frameworks/NetworkServer/bin/ ?
2. somehow derbynet.jar is missing in your classpath which is why this error.

Anthos

On 4/6/06, dan <[EMAIL PROTECTED]> wrote:
Hi Anil:
This is what I get
"
[EMAIL PROTECTED] bin]$ ./setNetworkClientCP.ksh
CLASSPATH=/home/dan/DerbyInstall/lib/derbyclient.jar:/home/dan/DerbyInstall/lib/derbytools.jar:

/home/dan/mysql-connector-java-3.1.10.tar.gz_FILES/mysql-connector-java-3.1.10/mysql-connector-java-3.1.10-bin.jar:
/home/dan/mysql-connector-java-3.1.10.tar.gz_FILES/mysql-connector-java-3.1.10/mysql-connector-java-3.1.10-bin-g.jar:
/home/dan/cos-05Nov2002.zip_FILES/lib/cos.jar
[EMAIL PROTECTED] bin]$
"
/dan


---------- Forwarded message ----------
From: "Anil Samuel" <[EMAIL PROTECTED]>
To: "Derby Discussion" < [email protected]>
Date: Thu, 6 Apr 2006 07:47:14 +1000
Subject: Re: PATH (newbie) problems...
Can you add
echo CLASSPATH=$CLASSPATH
at the end of the setNetworkClientCP.ksh, try executing the script and post here the console output.

Anthos

On 4/5/06, dan <[EMAIL PROTECTED]> wrote:
Hi Anil:
I've changed the scripts according to your recommendation, from
[ -z "$CLASSPATH" ] && {
  . "$DERBY_INSTALL"/frameworks/NetworkServer/bin/setNetworkClientCP.ksh
}
to
$DERBY_INSTALL/frameworks/NetworkServer/bin/setNetworkClientCP.ksh
Correct?
However I get this :-(:

[EMAIL PROTECTED] bin]$ ./setNetworkServerCP.ksh
[EMAIL PROTECTED] bin]$ ./startNetworkServer.ksh
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/derby/drda /NetworkServerControl
[EMAIL PROTECTED] bin]$








---------- Forwarded message ----------
From: "Anil Samuel" <[EMAIL PROTECTED] >
To: "Derby Discussion" < [email protected]>
Date: Wed, 5 Apr 2006 20:56:52 +1000
Subject: Re: PATH (newbie) problems...
Hi

I think
[ -z "$CLASSPATH" ] && {
. "$DERBY_INSTALL"/frameworks/NetworkServer/bin/setNetworkServerCP.ksh

}

in all .ksh files, causes the set*CP.ksh call to be skipped if CLASSPATH is defined. This can cause this issue.

I edited my .ksh files to remove
[ -z "$CLASSPATH" ] &&
and it works just fine.

Anthos
n 4/5/06, dan <[EMAIL PROTECTED]> wrote:
Hi Øystein:
Last line in startNetworkServer.ksh (attached) is
$JAVA_HOME/bin/java org.apache.derby.drda.NetworkServerControl start -h $DERBY_SERVER_HOST -p $DERBY_SERVER_PORT

where /java is a file...
...and where is
org.apache.derby.drda.NetworkServerControl? /dan


---------- Forwarded message ----------
From: Oystein Grovlen - Sun Norway <[EMAIL PROTECTED] >
To: Derby Discussion < [email protected]>
Date: Wed, 05 Apr 2006 10:30:55 +0200
Subject: Re: PATH (newbie) problems...
dan wrote:

> 3. Executing startNetworkServer results in
> [EMAIL PROTECTED] bin]$   ./startNetworkServer.ksh
> ./startNetworkServer.ksh: line 56: /usr/java/bin/java: No such file or
> [EMAIL PROTECTED] bin]$

Have you set JAVA_HOME? If not, the script will default to /usr/java,
but according to your path it should be /usr/java/jdk1.5.0_04.

--
Øystein Grøvlen, Senior Staff Engineer
Sun Microsystems, Database Technology Group
Trondheim, Norway







--
Anil Samuel < [EMAIL PROTECTED]>
Principal Technical Member
Product Development
Oracle Corporation



--
Anil Samuel <[EMAIL PROTECTED]>
Principal Technical Member
Product Development
Oracle Corporation



--
Anil Samuel <[EMAIL PROTECTED]>
Principal Technical Member
Product Development
Oracle Corporation
--- End Message ---
# ---------------------------------------------------------
# -- This script file sets the CLASSPATH environment variable
# -- for use with Derby products in Network Server mode
# --
# -- To use this script from other locations, change the 
# -- value assigned to DERBY_INSTALL to be an absolute path 
# -- (export DERBY_INSTALL=/opt/derby) instead of the current relative path
# --
# -- This file for use on Unix ksh systems
# -- 
# ---------------------------------------------------------
# DERBY_INSTALL=

export 
CLASSPATH="${DERBY_INSTALL}/lib/derbyclient.jar:${DERBY_INSTALL}/lib/derbytools.jar:${CLASSPATH}"
# ---------------------------------------------------------
# -- This simple script is an example of how to start dblook in 
# -- a NetworkServer environment.
# --
#-- REQUIREMENTS: 
# -- You must have the Derby libraries in your classpath
# -- 
# -- See the setEmbeddedCP.ksh for an example of
# -- how to do this.
# --
# -- This file for use on Unix ksh systems
# ---------------------------------------------------------

# DERBY_INSTALL=

 {
  . "$DERBY_INSTALL"/frameworks/NetworkServer/bin/setNetworkClientCP.ksh
}

# ---------------------------------------------------------
# -- start dblook
# ---------------------------------------------------------
java org.apache.derby.tools.dblook $@

# ---------------------------------------------------------
# -- To use a different JVM with a different syntax, simply edit
# -- this file
# ---------------------------------------------------------

# ---------------------------------------------------------
# -- This simple script is an example of how to start ij in 
# -- the Derby Network Server environment.
# --
#-- REQUIREMENTS: 
# -- You must have the Derby and DB2 JCC libraries in your classpath
# -- 
# -- See the setNetworkClientCP.ksh for an example of
# -- how to do this.
# --
# -- This file for use on Unix ksh systems
# ---------------------------------------------------------

# DERBY_INSTALL=

 {
  . "$DERBY_INSTALL"/frameworks/NetworkServer/bin/setNetworkClientCP.ksh
}
 
export IJ_HOST=localhost
export IJ_PORT=1527
export IJ_USER=APP
export IJ_PASSWORD=APP

# ---------------------------------------------------------
# -- start ij
# ---------------------------------------------------------
java -Dij.driver=org.apache.derby.jdbc.ClientDriver 
-Dij.protocol=jdbc:derby://$IJ_HOST:$IJ_PORT/ -Dij.user=$IJ_USER 
-Dij.password=$IJ_PASSWORD  org.apache.derby.tools.ij

# ---------------------------------------------------------
# -- To use a different JVM with a different syntax, simply edit
# -- this file
# ---------------------------------------------------------
## ---------------------------------------------------------
# -- This simple script is an example of how to run commands
# -- for the Network Server framework
# --
# -- REQUIREMENTS: 
# --      You must have the derby and Network Server jar files in your CLASSPATH
# --
# --  Check the setNetworkServerCP.ksh file for an example of
# --   what to set.
# -- 
# -- This file for use on Unix ksh systems
# ---------------------------------------------------------

# DERBY_INSTALL=

 {
  . "$DERBY_INSTALL"/frameworks/NetworkServer/bin/setNetworkServerCP.ksh
}

# ---------------------------------------------------------
# -- start Derby Network Server
# ---------------------------------------------------------

java org.apache.derby.drda.NetworkServerControl $*


# ---------------------------------------------------------
# -- To use a different JVM with a different syntax, simply edit
# -- this file
# ---------------------------------------------------------

# ---------------------------------------------------------
# -- This script file sets the CLASSPATH environment variable
# -- for use with Derby products in Network Server mode
# --
# -- To use this script from other locations, change the 
# -- value assigned to DERBY_INSTALL to be an absolute path 
# -- (export DERBY_INSTALL=/opt/derby) instead of the current relative path
# --
# -- This file for use on Unix ksh systems
# -- 
# ---------------------------------------------------------
# DERBY_INSTALL=

export 
CLASSPATH="${DERBY_INSTALL}/lib/derby.jar:${DERBY_INSTALL}/lib/derbytools.jar:${DERBY_INSTALL}/lib/derbynet.jar:${CLASSPATH}"
echo CLASSPATH=$CLASSPATH
# ---------------------------------------------------------
# -- This script file sets the CLASSPATH environment variable
# -- for use with Derby products in NetworkServer mode
# --
# -- To use this script from other locations, change the 
# -- value assigned to DERBY_INSTALL to be an absolute path 
# -- (export DERBY_INSTALL=/opt/derby) instead of the current relative path
# --
# -- This file for use on Unix ksh systems
# -- 
# ---------------------------------------------------------
# DERBY_INSTALL=

export 
CLASSPATH="${DERBY_INSTALL}/lib/derby.jar:${DERBY_INSTALL}/lib/derbytools.jar:${DERBY_INSTALL}/lib/derbynet.jar:${CLASSPATH}"
## ---------------------------------------------------------
# -- This simple script is an example of how to start Derby
# -- as a server inside the Network Server framework
# --
# -- REQUIREMENTS:
# --     You must have the derby and Network Server jar files in your CLASSPATH
# --
# --  Check the setNetworkServerCP.ksh file for an example of
# --   what to set.
# --
# -- This file for use on Unix ksh systems
# ---------------------------------------------------------
# ---------------------------------------------------------
# -- start Derby Network Server
# ---------------------------------------------------------

# DERBY_INSTALL=

 {
  . "$DERBY_INSTALL"/frameworks/NetworkServer/bin/setNetworkServerCP.ksh
}

if [ -z "$JAVA_HOME" ]
then
   JAVA_HOME=/usr/java/jdk1.5.0_04
fi

# ---------------------------------------------------------
# -- Determine the host and port to use by:
# --  1. Check to see if the host and port are set on the command line
# --  2. Check to see if DERBY_SERVER_HOST and DERBY_SERVER_PORT
# --  3. Default to localhost/1527
# ---------------------------------------------------------

if [  "$1" ]
then
   DERBY_SERVER_HOST=$1
fi

if [ -z "$DERBY_SERVER_HOST" ]
then
   DERBY_SERVER_HOST=localhost
fi

if [  "$2" ]
then
   DERBY_SERVER_PORT=$2
fi

if [ -z "$DERBY_SERVER_PORT" ]
then
   DERBY_SERVER_PORT=1527
fi

$JAVA_HOME/bin/java org.apache.derby.drda.NetworkServerControl start -h 
$DERBY_SERVER_HOST -p $DERBY_SERVER_PORT

# ---------------------------------------------------------
# -- To use a different JVM with a different syntax, simply edit
# -- this file
# ---------------------------------------------------------

## ---------------------------------------------------------
# -- This simple script is an example of how to shutdown Derby
# -- running as a server inside the Network Server framework
# --
# -- REQUIREMENTS:
# --     You must have the derby and Network Server jar files in your CLASSPATH
# --
# --  Check the setNetworkServerCP.ksh file for an example of
# --   what to set.
# --
# -- This file for use on Unix ksh systems
# ---------------------------------------------------------
# ---------------------------------------------------------
# -- shutdown Derby Network Server
# ---------------------------------------------------------

# DERBY_INSTALL=

 {
  . "$DERBY_INSTALL"/frameworks/NetworkServer/bin/setNetworkServerCP.ksh
}

if [ -z "$JAVA_HOME" ]
then
   JAVA_HOME=/usr/java/jdk1.5.0_04
fi

# ---------------------------------------------------------
# -- Determine the host and port to use by:
# --  1. Check to see if the host and port are set on the command line
# --  2. Check to see if DERBY_SERVER_HOST and DERBY_SERVER_PORT
# --  3. Default to localhost/1527
# ---------------------------------------------------------

if [  "$1" ]
then
   DERBY_SERVER_HOST=$1
fi

if [ -z "$DERBY_SERVER_HOST" ]
then
   DERBY_SERVER_HOST=localhost
fi

if [  "$2" ]
then
   DERBY_SERVER_PORT=$2
fi

if [ -z "$DERBY_SERVER_PORT" ]
then
   DERBY_SERVER_PORT=1527
fi

$JAVA_HOME/bin/java org.apache.derby.drda.NetworkServerControl shutdown -h 
$DERBY_SERVER_HOST -p $DERBY_SERVER_PORT

# ---------------------------------------------------------
# -- To use a different JVM with a different syntax, simply edit
# -- this file
# ---------------------------------------------------------

# ---------------------------------------------------------
# -- This script file is an example of how to use sysinfo to get
# -- important system information
# --
# -- REQUIREMENTS:
# --
# --  This utility will report important system info about 
# --  jar files which are in your classpath and the current setting of
# --  Derby Network Server parameters. Jar files which are not
# --  if your classpath will not be reported. 
# --  The Derby Network Server must be running for this utility to work.
# --
# -- Check the setNetworkServerCP.ksh to see an example of adding the
# -- the Derby jars to your classpath.
# -- 
# --
# -- This file for use on Unix korn shell systems
# ---------------------------------------------------------

# DERBY_INSTALL=

 {
  . "$DERBY_INSTALL"/frameworks/NetworkServer/bin/setNetworkServerCP.ksh
}

# ---------------------------------------------------------
# -- start sysinfo
# ---------------------------------------------------------
java org.apache.derby.drda.NetworkServerControl sysinfo $*
# ---------------------------------------------------------
# -- To use a different JVM with a different syntax, simply edit
# -- this file
# ---------------------------------------------------------

Reply via email to