Forum: Installation

Post: I need help to install on Ubuntu

I need help to install on Ubuntu
Paulo Cesar Breim
Jul 18, 2010
I am still have problem to install VoitDB so I need some help

Here is the information about classpath, folder and the problem.

pcb:~$echo $CLASSPATH
/home/pcb/helloworld:/opt/voltdb/voltdb/*
pcb:$ ls -l /opt/voltdb/voltdb
total 121496
-rw-r--r-- 1 root root 35146 2010-05-24 11:12 COPYING
-rw-r--r-- 1 root root 121247329 2010-05-24 11:12 libvoltdb-1.0.01.so
-rw-r--r-- 1 root root 3119874 2010-05-24 11:12 voltdb-1.0.01.jar
pcb:~$ sudo java -Djava.library.path=/opt/voltdb/voltdb org.voltdb.VoltDB catalog voltdb-1.0.01.jarException in thread "main" java.lang.NoClassDefFoundError: org/voltdb/VoltDB
Caused by: java.lang.ClassNotFoundException: org.voltdb.VoltDB
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)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
Could not find the main class: org.voltdb.VoltDB. Program will exit.


What is wrong?

Thank you

Paulo
Hi Paulo, If you run Java
aweisberg
Jul 18, 2010
Hi Paulo,
If you run java using sudo then I don't think it inherits the classpath environment variable from user pcb. If the permissions on the .so and .jar allow allow them to be read by other then you should be able to run without sudo.
Ariel
Porblem do Start
Paulo Cesar Breim
Jul 19, 2010
Hi Paulo,
If you run java using sudo then I don't think it inherits the classpath environment variable from user pcb. If the permissions on the .so and .jar allow allow them to be read by other then you should be able to run without sudo.
Ariel


Opsss I Found the problem.
My ubuntu is 32 bits. I will install 64. bits
Hi Paulo, Yes we only support
aweisberg
Jul 19, 2010
Hi Paulo,
Yes we only support 64-bit Ubuntu for the server. The client should run on 32-bit Ubuntu. From what you posted it looked like you got the HelloWorld catalog compiled and server running, but then you ran

java -Djava.library.path=$HOME//voltdb/voltdb org.voltdb.VoltDB catalog
voltdb-1.0.01.jar



which doesn't work because the voltdb jar isn't a catalog. If you were trying to start the client you would just specify the correct classpath and HelloWorld as the only argument instead of org.voltdb.VoltDB. -Ariel
problem incorrect classpath: /opt/voltdb/voltdb/*
Paulo Cesar Breim
Jul 19, 2010
I received this error when I try to compile javacn Cliente,java

Here is my configuration:
CLASSPATH=$HOME/helloworld:/opt/voltdb/voltdb/*

classpath is correct, what is wrong?

Paulo
re: installing/running on Ubuntu
tcallaghan
Jul 19, 2010
Paulo,
To make sure we aren't dealing with a permissions issue can you please unpack the kit using your user account into your home directory, as follows:

$ tar -zxvf voltdb-1.0.01.tar.gz -C $HOME/

When that is done make sure your $CLASSPATH is "/home/pcb/helloworld:/home/pcb/voltdb-1.0.01/voltdb/*". You can use $HOME for /home/pcb if you like.

Next please compile your application and create your catalog. If there are any issues please reply with your environment settings, compile statements, and resulting output. (Use "-Djava.library.path=/home/pcb/voltdb-1.0.01/voltdb" instead of referencing /opt/...)

-Tim
re: installing/running on Ubuntu
Paulo Cesar Breim
Jul 19, 2010
Paulo,
To make sure we aren't dealing with a permissions issue can you please unpack the kit using your user account into your home directory, as follows:

$ tar -zxvf voltdb-1.0.01.tar.gz -C $HOME/

When that is done make sure your $CLASSPATH is "/home/pcb/helloworld:/home/pcb/voltdb-1.0.01/voltdb/*". You can use $HOME for /home/pcb if you like.

Next please compile your application and create your catalog. If there are any issues please reply with your environment settings, compile statements, and resulting output. (Use "-Djava.library.path=/home/pcb/voltdb-1.0.01/voltdb" instead of referencing /opt/...)

-Tim


Hi Tim,
lock:

I did:
tar -zxvf LINUX-voltdb-1.0.01.tar.gz -C $HOME/

OK, installed see:
$ ls -l $HOME/voltdb-1.0.01/voltdb
total 121492
-rw-r--r-- 1 pcb pcb 35146 2010-05-24 11:12 COPYING
-rw-r--r-- 1 pcb pcb 121247329 2010-05-24 11:12 libvoltdb-1.0.01.so
-rw-r--r-- 1 pcb pcb 3119874 2010-05-24 11:12 voltdb-1.0.01.jar

$ echo $CLASSPATH
/home/pcb/helloworld:/home/pcb/voltdb-1.0.01/voltdb/*
(into helloworld...)
$ javac Client.java
incorrect classpath: /home/pcb/voltdb-1.0.01/voltdb/*
----------
1. ERROR in Client.java (at line 1)
import org.voltdb.*;
^^^^^^^^^^
The import org.voltdb cannot be resolved


e others erros...

I must be going blind..

[]s
paulo
re: Ubuntu
tcallaghan
Jul 19, 2010
Hi Tim,
lock:

I did:
tar -zxvf LINUX-voltdb-1.0.01.tar.gz -C $HOME/...


Paulo,
Can you please provide more information, specifically:
1. output from "java -version"
2. output from "javac -version"
3. full output from "javac Client.java" (everything from your command to the next command prompt)
-Tim
$ java -version java version
Paulo Cesar Breim
Jul 20, 2010
Paulo,
Can you please provide more information, specifically:
1. output from "java -version"
2. output from "javac -version"
3. full output from "javac Client.java" (everything from your command to the next command prompt)
-Tim


$ java -version
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu1)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

$ javac -version
Eclipse Java Compiler 0.972_R35x, 3.5.1 release, Copyright IBM Corp 2000, 2009. All rights reserved.

$ javac Client.java
incorrect classpath: /home/pcb/voltdb/voltdb/*
----------
1. ERROR in Client.java (at line 1)
import org.voltdb.*;
^^^^^^^^^^
The import org.voltdb cannot be resolved
----------
2. ERROR in Client.java (at line 2)
import org.voltdb.client.*;
^^^^^^^^^^
The import org.voltdb cannot be resolved
----------
3. ERROR in Client.java (at line 11)
org.voltdb.client.Client myApp;
^^^^^^^^^^
org.voltdb cannot be resolved to a type
----------
4. ERROR in Client.java (at line 12)
myApp = ClientFactory.createClient();
^^^^^^^^^^^^^
ClientFactory cannot be resolved
----------
5. ERROR in Client.java (at line 27)
final ClientResponse response = myApp.callProcedure("Select",
^^^^^^^^^^^^^^
ClientResponse cannot be resolved to a type
----------
6. ERROR in Client.java (at line 29)
if (response.getStatus() != ClientResponse.SUCCESS){
^^^^^^^^^^^^^^
ClientResponse cannot be resolved
----------
7. ERROR in Client.java (at line 34)
final VoltTable results[] = response.getResults();
^^^^^^^^^
VoltTable cannot be resolved to a type
----------
8. ERROR in Client.java (at line 36)
System.out.printf("I can't say Hello in that language.");
^^^^^^
The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String)
----------
9. ERROR in Client.java (at line 40)
VoltTable resultTable = results[0];
^^^^^^^^^
VoltTable cannot be resolved to a type
----------
10. ERROR in Client.java (at line 41)
VoltTableRow row = resultTable.fetchRow(0);
^^^^^^^^^^^^
VoltTableRow cannot be resolved to a type
----------
10 problems (10 errors)


One more information:

I got helloworld.jar from other machine (my MAC) to test and this line bellow work well


CLASSPATH=$HOME/helloworld:$HOME/voltdb-1.0.01/voltdb/*
export CLASSPATH
java -Djava.library.path=$HOME/voltdb-1.0.01/voltdb org.voltdb.VoltDB catalog helloworld.jar


[]s

Paulo
Hi Paulo, It looks like the
aweisberg
Jul 20, 2010
$ java -version
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu1)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)...


Hi Paulo,
It looks like the javac you are using is not part of OpenJDK or the SunJDK and that it is rejecting the formatting of your classpath environment variable. If you try `which javac` it should tell you where you are picking it up from.

My preference for selecting JDKs is to download the latest version from java.sun.com, expand it into my home directory, and then create a jdk symlink to the specific version I just downloaded. Then I add $HOME/jdk/jre/bin and $HOME/jdk/bin (in that order) to the beginning of my PATH so that I pick up those specific versions and not whatever happens to be installed on the system I am running on.


Also the classpath you are using will expand out to two files, the .so and the .jar. I think what you want is $HOME/helloworld:$HOME/voltdb-1.0.01/voltdb/voltdb*


Hope this helps,
Ariel Weisberg
Resolved
Paulo Cesar Breim
Jul 20, 2010
Hi Paulo,
It looks like the javac you are using is not part of OpenJDK or the SunJDK and that it is rejecting the formatting of your classpath environment variable. If you try `which javac` it should tell you where you are picking it up from.

My preference for selecting JDKs is to download the latest version from java.sun.com, expand it into my home directory, and then create a jdk symlink to the specific version I just downloaded. Then I add $HOME/jdk/jre/bin and $HOME/jdk/bin (in that order) to the beginning of my PATH so that I pick up those specific versions and not whatever happens to be installed on the system I am running on.


Also the classpath you are using will expand out to two files, the .so and the .jar. I think what you want is $HOME/helloworld:$HOME/voltdb-1.0.01/voltdb/voltdb*


Hope this helps,
Ariel Weisberg


Thank you People,
It is running now.
paulo