6 Replies Latest reply: Jul 11, 2013 8:18 PM by user445791 RSS

    How to Install or Run on Windows Xp/7

    898484
      Hi, I just see the bin/kvctl for Linux.
      How to Install o Run on Windows ?
        • 1. Re: How to Install or Run on Windows Xp/7
          Charles Lamb
          Presently, Windows is not a supported platform for NoSQL Database so we do not have a Windows-compatible kvctl script. However, since NoSQL Database is written in Java, it is likely that you can still run it under Windows. I suggest that you use the -verbose option to kvctl on Linux and let it print out the actual "java ..." command that it is executing. You can then cut-and-paste that command (with suitable edits as necessary) into a Windows command line.

          Charles
          • 2. Re: How to Install or Run on Windows Xp/7
            899218
            It works well at my Windows XP workstation. I use gygwin to run kvctl. The only one issue with running these scripts under cygwin is CLASSPATH. You may need to fix script to get CLASSPATH env variable correct.
            • 3. Re: How to Install or Run on Windows Xp/7
              Gmfeinberg-Oracle
              Sergey,

              Thanks for this. We're aware of the issue on Cygwin and the required fixes. If you want a cygwin-specific kvctl edit the script and modify the setclasspath() function to read:
              CLASSPATH=`cygpath -wp $CLASSPATH:$KVINSTALL/lib/$KVSTOREJAR`
              export CLASSPATH

              The actual fix will be conditional and work on other platforms as well.

              George
              It works well at my Windows XP workstation. I use gygwin to run kvctl. The only one issue with running these scripts under cygwin is CLASSPATH. You may need to fix script to get CLASSPATH env variable correct.
              • 4. Re: How to Install or Run on Windows Xp/7
                541014
                Any chance any linux/windows users can convert the run-kvlite.sh to a Windows bat file? (see below) It would be nice to play with kvlite on Windows. Also, any idea if configuration and running on Windows will be officially supported in future by Oracle?


                #!/bin/bash

                # find directory where the script was found
                HERE=`pwd`
                cd `dirname $0`
                export BINDIR=`pwd`
                cd $HERE
                export LIBDIR=$BINDIR/../lib
                export EXAMPLEDIR=$BINDIR/../examples

                function usage {
                echo 'Usage: run-kvlite.sh [-help]'
                echo ' [-logging]'
                echo ' [-store storeName]'
                echo ' [-port port]'
                echo ' [-host hostname]'
                echo ' [-root rootDir]'
                echo ' [-admin adminPort]'
                echo ' -logging enables console logging'
                echo ' -store defaults to kvstore'
                echo ' -port defaults to 5000'
                echo ' -host defaults to localhost'
                echo ' -root defaults to ./kvroot and is created on demand'
                }

                export KVSTORE=kvstore
                export HOSTNAME=127.0.0.1
                export REGPORT=5000
                export KVROOT=./kvroot
                LOGGING=""
                ADMINPORT=""

                for arg
                do
                case "$arg" in
                -usage)
                     usage
                     exit;;
                -help)
                     usage
                     exit;;
                -logging)
                     LOGGING="-Djava.util.logging.config.file=$EXAMPLEDIR/logging.properties";
                     shift;;
                -store)
                     KVSTORE=$2; shift;
                     shift;;
                -host)
                     HOSTNAME=$2; shift;
                     shift;;
                -root)
                     KVROOT=$2; shift;
                     shift;;
                -port)
                REGPORT=$2; shift;
                shift;;
                -admin)
                     ADMINPORT="-admin $2"; shift;
                     shift;;
                esac
                done

                if [[ -n "${KVROOT}" ]] ; then
                mkdir -p $KVROOT
                fi

                java $LOGGING -cp $LIBDIR/kvstore-1.1.100.jar oracle.kv.util.kvlite.KVLite -root $KVROOT -store $KVSTORE -host $HOSTNAME -port $REGPORT $ADMINPORT
                • 5. Re: How to Install or Run on Windows Xp/7
                  Charles Lamb
                  The actual command to invoke kvlite is pretty simple. From the bottom of the kvlite script:

                  java $LOGGING -cp $LIBDIR/kvstore-1.1.100.jar oracle.kv.util.kvlite.KVLite -root $KVROOT -store $KVSTORE -host $HOSTNAME -port $REGPORT $ADMINPORT

                  Here is a .cmd file that you can use (it's not supported). Some of our developers run on Windows but it is not a supported platform since we don't run our qualification tests on it. It's Java code, so in theory, "it should just work".

                  @ECHO OFF
                  CLS
                  SET RETURN_CODE=
                  SETLOCAL

                  echo %~dp0

                  SET HERE=%CD%
                  SET BINDIR=%~dp0
                  cd %HERE%
                  SET LIBDIR=%BINDIR%\..\lib
                  SET EXAMPLEDIR=%BINDIR%\..\examples

                  SET KVSTORE=kvstore
                  SET HOSTNAME=127.0.0.1
                  SET REGPORT=5000
                  SET KVROOT=kvroot
                  SET LOGGING=
                  SET ADMINPORT=

                  setlocal enabledelayedexpansion

                  :LOOP_ARGS

                  SET ARGNAME=%1
                  SET ARGVALUE=%2

                  IF NOT "%1"=="" (

                  IF "%ARGNAME%"=="-store" (
                  SET KVSTORE=%ARGVALUE%
                  SHIFT
                  SHIFT
                  ) ELSE (
                  IF "%ARGNAME%"=="-port" (
                  SET REGPORT=%ARGVALUE%
                  SHIFT
                  SHIFT
                  ) ELSE (
                  IF "%ARGNAME%"=="-root" (
                  SET KVROOT=%ARGVALUE%
                  SHIFT
                  SHIFT
                  ) ELSE (
                  IF "%ARGNAME%"=="-host" (
                  SET HOSTNAME=%ARGVALUE%
                  SHIFT
                  SHIFT
                  ) ELSE (
                  IF "%ARGNAME%"=="-admin" (
                  SET ADMINPORT=-admin %ARGVALUE%
                  SHIFT
                  SHIFT
                  ) ELSE (
                  IF "%ARGNAME%"=="-logging" (
                  SET LOGGING=-Djava.util.logging.config.file=%EXAMPLEDIR%
                  /logging.properties
                  SHIFT
                  ) ELSE (
                  IF "%ARGNAME%"=="-usage" (
                  call:USAGE
                  GOTO:end
                  ) ELSE (
                  IF "%ARGNAME%"=="-help" (
                  call:USAGE
                  GOTO:end
                  )
                  )
                  )
                  )
                  )
                  )
                  )
                  )

                  GOTO LOOP_ARGS
                  )

                  IF NOT EXIST %KVROOT% (
                  MKDIR %KVROOT%
                  )

                  echo Store "%KVSTORE%" starting ...

                  java %LOGGING% -cp %LIBDIR%/kvstore-1.1.100.jar oracle.kv.util.kvlite.KVLite -root %KVROOT% -store %KVSTORE% -host %HOSTNAME% -port %REGPORT% %ADMINPORT%

                  echo.&goto:eof

                  ::--------------------------------------------------------
                  ::-- Usage Function
                  ::--------------------------------------------------------

                  :USAGE
                  echo Usage: run-kvlite.sh [-help]
                  echo [-logging]
                  echo [-store storeName]
                  echo [-port port]
                  echo [-host hostname]
                  echo [-root rootDir]
                  echo [-admin adminPort]
                  echo -logging enables console logging
                  echo -store defaults to kvstore
                  echo -port defaults to 5000
                  echo -host defaults to localhost
                  echo -root defaults to ./kvroot and is created on demand
                  :end
                  • 6. Re: How to Install or Run on Windows Xp/7
                    user445791

                    Hi:

                     

                    I finally installed Nosql, compiled example\schema, added ddl and when running the class get the error:

                     

                    D:\nosql\kv-2.0.39>java -jar lib/kvstore.jar ping -host xxx -port 5000

                    Pinging components of store kvstore based upon topology sequence #14

                    kvstore comprises 10 partitions and 1 Storage Nodes

                    Storage Node [sn1] on xxx:5000    Datacenter: KVLite [dc1]    Status: RUNNING   Ver: 11gR2.2.0.39 2013-04-23 08:28:13

                    UTC  Build id: b205fb13eb4e

                            Rep Node [rg1-rn1]      Status: RUNNING,MASTER at sequence number: 57 haPort: 5006

                     

                     

                    D:\nosql\kv-2.0.39>java -jar D:/nosql/kv-2.0.39/lib/kvclient.jar

                    11gR2.2.0.39

                     

                     

                    D:\nosql\kv-2.0.39>cd D:\nosql\kv-2.0.39\examples\schema\classes

                     

                     

                    D:\nosql\kv-2.0.39\examples\schema\classes>java schema.SchemaExample -store kvstore -host localhost -port 5000

                    java.lang.NullPointerException

                            at schema.Bindings.parseResource(Bindings.java:82)

                            at schema.Bindings.<init>(Bindings.java:54)

                            at schema.SchemaExample.<init>(SchemaExample.java:183)

                            at schema.SchemaExample.main(SchemaExample.java:134)

                     

                     

                    D:\nosql\kv-2.0.39\examples\schema\classes>java -version

                    java version "1.7.0_10"

                    Java(TM) SE Runtime Environment (build 1.7.0_10-b18)

                    Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

                     

                     

                    D:\nosql\kv-2.0.39\examples\schema\classes>

                     

                    Please help. Should I start a different thread?