derby from the CLI

Thufir hawat.thufir at gmail.com
Fri Aug 24 01:35:25 UTC 2012


I'm kinda sorta able to use derby ij:


root at dur:~/apache-james-3.0-beta4/var/store/derby# 
root at dur:~/apache-james-3.0-beta4/var/store/derby# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
root at dur:~/apache-james-3.0-beta4/var/store/derby# 
root at dur:~/apache-james-3.0-beta4/var/store/derby# echo $DERBY_INSTALL
/opt/db-derby-10.9.1.0-bin/lib/
root at dur:~/apache-james-3.0-beta4/var/store/derby# 
root at dur:~/apache-james-3.0-beta4/var/store/derby# echo $DERBY_HOME
/opt/db-derby-10.9.1.0-bin/
root at dur:~/apache-james-3.0-beta4/var/store/derby# 
root at dur:~/apache-james-3.0-beta4/var/store/derby# cat /etc/environment 
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/
games"
JAVA_HOME="/usr/lib/jvm/java-6-openjdk-i386/jre/"
DERBY_HOME="/opt/db-derby-10.9.1.0-bin/"
root at dur:~/apache-james-3.0-beta4/var/store/derby# 
root at dur:~/apache-james-3.0-beta4/var/store/derby# echo $CLASSPATH
/opt/db-derby-10.9.1.0-bin//lib/derby.jar:/opt/db-derby-10.9.1.0-bin//lib/
derbytools.jar:
root at dur:~/apache-james-3.0-beta4/var/store/derby# 
root at dur:~/apache-james-3.0-beta4/var/store/derby# java 
org.apache.derby.tools.ij 
ij version 10.9
ij> quit;
root at dur:~/apache-james-3.0-beta4/var/store/derby# 


However, if I open another console, I get:



thufir at dur:~$ 
thufir at dur:~$  java org.apache.derby.tools.ij
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
derby/tools/ij
Caused by: java.lang.ClassNotFoundException: org.apache.derby.tools.ij
	at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.apache.derby.tools.ij. Program will 
exit.
thufir at dur:~$ 
thufir at dur:~$ 
thufir at dur:~$ sudo su -
[sudo] password for thufir: 



root at dur:~# 
root at dur:~# ll /opt/db-derby-10.9.1.0-bin/bin/setNetworkClientCP
-rwxr-xr-x 1 root root 1079 May 23 14:03 /opt/db-derby-10.9.1.0-bin/bin/
setNetworkClientCP*
root at dur:~# 
root at dur:~# 


surely I don't need to run this setNetworkClientCP script again, do I?







More information about the ubuntu-users mailing list