db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frederik (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2136) Can't set system directory with derby.system.home for Network Server
Date Mon, 04 Dec 2006 10:25:21 GMT
    [ http://issues.apache.org/jira/browse/DERBY-2136?page=comments#action_12455267 ] 
            
Frederik commented on DERBY-2136:
---------------------------------

Please RESOLVE/CLOSE this to INVALID (it seems I can't)

My apologies... I don't know what went wrong last Friday, but today I can't reproduce... Careful
testing proved that it works as promised. A lesson in humbleness I won't forget for the rest
of the, euh, week ;-)


## INITIALISING
##------------------------------------------------------------------------------------
cd /data/tmp
mkdir derby_pwd
mkdir derby_derby.system.home
mkdir derby_user.dir
export DERBY_HOME=/app/tmp/derby/db-derby-10.2.1.6-bin
export PATH="$DERBY_HOME/bin:$PATH"
export JAVA_HOME=/app/gwts/iw-home/tools/java
$JAVA_HOME/jre/bin/java -version
  >>>
  java version "1.4.2_05"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
  Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
  <<<
which startNetworkServer
  >>>
  /app/tmp/derby/db-derby-10.2.1.6-bin/bin/startNetworkServer
  <<<


## TEST 1 : setting user.dir
##------------------------------------------------------------------------------------
export DERBY_OPTS=-Duser.dir=/data/tmp/derby_user.dir
cd /data/tmp/derby_pwd
export | grep DERBY
  >>>
  declare -x DERBY_HOME="/app/tmp/derby/db-derby-10.2.1.6-bin"
  declare -x DERBY_OPTS="-Duser.dir=/data/tmp/derby_user.dir"
  <<<
startNetworkServer &
ij
> connect 'jdbc:derby://localhost/test_userdir;create=true';
> exit;

stopNetworkServer

RESULTS OK : 
  file: /data/tmp/derby_pwd/derby.log
  dir:  /data/tmp/derby_user.dir/test_userdir


## TEST 2: setting derby.system.home
##------------------------------------------------------------------------------------
export DERBY_OPTS=-Dderby.system.home=/data/tmp/derby_derby.system.home
cd /data/tmp/derby_pwd
export | grep DERBY
  >>>
  declare -x DERBY_HOME="/app/tmp/derby/db-derby-10.2.1.6-bin"
  declare -x DERBY_OPTS="-Dderby.system.home=/data/tmp/derby_derby.system.home"
  <<<
startNetworkServer &
ij
> connect 'jdbc:derby://localhost/test_derbysystemhome;create=true';
> exit;
stopNetworkServer

RESULTS:
  file: /data/tmp/derby_derby.system.home/derby.log
  dir:  /data/tmp/derby_derby.system.home/test_derbysystemhome/


## TEST 3 : no DERBY_OPTS -> using present working directory (pwd)
##------------------------------------------------------------------------------------
unset DERBY_OPTS
cd /data/tmp/derby_pwd
export | grep DERBY
>>>
declare -x DERBY_HOME="/app/tmp/derby/db-derby-10.2.1.6-bin"
<<<
startNetworkServer &
ij
> connect 'jdbc:derby://localhost/test_derbypwd;create=true';
> exit;
stopNetworkServer

RESULTS OK:
file: derby_pwd/derby.log
dir:  derby_pwd/test_derbypwd/


> Can't set system directory with derby.system.home for Network Server
> --------------------------------------------------------------------
>
>                 Key: DERBY-2136
>                 URL: http://issues.apache.org/jira/browse/DERBY-2136
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation, Network Server
>            Reporter: Frederik
>            Priority: Minor
>
> I'm a total newcomer to Derby. Decided to play with it today after reading http://www.regdeveloper.co.uk/2006/11/08/java_database_derby
> I want to use the Network Server deployment mode. For determining the System Directory
(which holds properties file and the database directories, etc), I understood from docs (e.g.
http://db.apache.org/derby/docs/10.2/devguide/cdevdvlp27610.html) that I should set derby.system.home.

> I tried (using the newer scripts in $DERBY_HOME/bin)
> export DERBY_OPTS=-Dderby.system.home=/data/derby 
> startNetworkServer
> but that failed to set the system directory properly (as witnessed by "NetworkServerControl
sysinfo"). It was using current directory when starting derby.
> I finally discovered that it works if I do 
> export DERBY_OPTS=-Duser.dir=/data/derby 
> startNetworkServer
> That seems to be either a bug or a docbug to me. 
> (Almost all docs are using the scripts in $DERBY_HOME/frameworks/NetworkServer/bin instead
of the newer ones in ./bin ; except for http://db.apache.org/derby/docs/10.2/getstart/ and
the mention in 10.2 release notes)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message