Announcement

Collapse
No announcement yet.

(newbie) Command not found running new install

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • (newbie) Command not found running new install

    Running Ubuntu 16.04 LTS. Downloaded and installed community edition per instructions. Trying to run examples. Input "voltdb create" from terminal receives "Command not found" response.

    What am I missing?

  • #2
    Is voltdb in you PATH? Either add the bin directory to your PATH or call the commands with the path in them.

    Ruth

    Comment


    • #3
      Please pardon the newbie stuff. I have no background in Java or Python or xml. I'm a C++ developer.

      The path and JDK are set per the instructions. Apparently the community edition has to be built before anything will run, but I can't seem to find any instruction on how to build it. I see the build.xml, but when I try to execute it gives me a "missing style" error. Can anyone point me in the right direction?

      Comment


      • #4
        Hi,
        Thanks for the context. The instructions are at https://github.com/VoltDB/voltdb/wiki/Building-VoltDB. This covers all the requirements and the scripts to build. Here are the exact commands I used:


        git clone https://github.com/VoltDB/voltdb.git
        cd voltdb
        ant
        PATH=`pwd`/bin/:$PATH
        cd examples/voltkv
        sqlcmd ddl.sql
        ./run.sh client

        What might be helpful is for you to open a script session and if you run into any issues, post the script.txt

        Comment


        • #5
          Thanks.
          When I run this sequence the build fails with the following message:
          Cannot run program "xjc" (in directory "/home/mike/voltdb/src/frontend"): error=2, No such file or directory
          I found the program xjc in the bin subdirectory of the JDK download, copied it into the above-named directory, but get the same message.

          Script follows:
          mike@mike-VirtualBox:~/voltdb$ ant
          Buildfile: /home/mike/voltdb/build.xml

          catalog:

          dbbpool_gen_check:

          dbbpool_gen:

          project_gen_check:

          project_gen:

          BUILD FAILED
          /home/mike/voltdb/build.xml:2688: Execute failed: java.io.IOException: Cannot run program "xjc" (in directory "/home/mike/voltdb/src/frontend"): error=2, No such file or directory
          at java.lang.ProcessBuilder.start(ProcessBuilder.java :1048)
          at java.lang.Runtime.exec(Runtime.java:620)
          at org.apache.tools.ant.taskdefs.launcher.Java13Comma ndLauncher.exec(Java13CommandLauncher.java:58)
          at org.apache.tools.ant.taskdefs.Execute.launch(Execu te.java:428)
          at org.apache.tools.ant.taskdefs.Execute.execute(Exec ute.java:442)
          at org.apache.tools.ant.taskdefs.ExecTask.runExecute( ExecTask.java:629)
          at org.apache.tools.ant.taskdefs.ExecTask.runExec(Exe cTask.java:670)
          at org.apache.tools.ant.taskdefs.ExecTask.execute(Exe cTask.java:496)
          at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:293)
          at sun.reflect.GeneratedMethodAccessor4.invoke(Unknow n Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
          at org.apache.tools.ant.Task.perform(Task.java:348)
          at org.apache.tools.ant.Target.execute(Target.java:43 5)
          at org.apache.tools.ant.Target.performTasks(Target.ja va:456)
          at org.apache.tools.ant.Project.executeSortedTargets( Project.java:1405)
          at org.apache.tools.ant.Project.executeTarget(Project .java:1376)
          at org.apache.tools.ant.helper.DefaultExecutor.execut eTargets(DefaultExecutor.java:41)
          at org.apache.tools.ant.Project.executeTargets(Projec t.java:1260)
          at org.apache.tools.ant.Main.runBuild(Main.java:853)
          at org.apache.tools.ant.Main.startAnt(Main.java:235)
          at org.apache.tools.ant.launch.Launcher.run(Launcher. java:285)
          at org.apache.tools.ant.launch.Launcher.main(Launcher .java:112)
          Caused by: java.io.IOException: error=2, No such file or directory
          at java.lang.UNIXProcess.forkAndExec(Native Method)
          at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
          at java.lang.ProcessImpl.start(ProcessImpl.java:134)
          at java.lang.ProcessBuilder.start(ProcessBuilder.java :1029)
          ... 23 more

          Total time: 1 second

          Comment


          • #6
            I removed the download-manually-installed version of java and installed directly using sudo apt-get install openjdk-8-jdk, then added the following to /etc/environment: JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
            Still can't seem to get it to run. Here's that script:

            mike@mike-VirtualBox:~/voltdb$ ant
            Error: JAVA_HOME is not defined correctly.
            We cannot execute /usr/lib/jvm/java-8-openjdk-amd64/bin/java

            mike@mike-VirtualBox:~/voltdb$ echo $JAVA_HOME
            /usr/lib/jvm/java-8-openjdk-amd64

            mike@mike-VirtualBox:~/voltdb$ cd /usr/lib/jvm/java-8-openjdk-amd64/bin

            mike@mike-VirtualBox:/usr/lib/jvm/java-8-openjdk-amd64/bin$ ls
            appletviewer javac jconsole jmap jstat schemagen
            extcheck javadoc jdb jps jstatd serialver
            idlj javah jdeps jrunscript native2ascii wsgen
            jar javap jhat jsadebugd policytool wsimport
            jarsigner jcmd jinfo jstack rmic xjc


            What am I missing?

            Comment


            • #7
              I finally got it to build. I first had to remove/reinstall java (again). It turns out that Oracle no longer provides a default JDK installation for Ubuntu. The following commands worked for me:
              sudo apt-get install python-software-properties
              sudo add-apt-repository ppa:webupd8team/java
              sudo apt-get update
              sudo apt-get install oracle-java8-installer

              Then update JAVA_HOME in /etc/environment
              JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre"

              After this the voltdb build worked.

              Comment


              • #8
                Glad you got it working! I was about to ask you about how you installed the JDK. Let us know if you need any help with VoltDB.

                Comment

                Working...
                X