7 Replies Latest reply: Apr 30, 2013 2:00 PM by 1005853 RSS

    Oracle NoSQL Database Loader with latest EE does not work

    1005853
      I am unable to run the Oracle NoSQL Database Loader to load data at: http://www.oracle.com/technetwork/products/nosqldb/documentation/index.html which is included as documentation with the latest download of Oracle NoSQL. I have downloaded the EE onto my Unix machine and have JAVA version:
      "1.7.0_17" running.

      (I am running KVlite. I was able to run the Hello Big Data World example.)

      Here is step 6 in the README.txt file that I am unable to run.6. To load the content of tweeter feed into the store run this command:
      $java -cp SAMPLE_HOME/OLH/ONLH/deploy/onlh.jar;SAMPLE_HOME/OLH/ONLH/lib/nosql/kvclient-1.2.123.jar oracle.kv.sample.Loader -i SAMPLE_HOME/OLH/ONLH/deploy/airline_tweets_search-03-01-2012-082206.xml -m "US <userID> " -n "<userName>" -v "<userName> <userID>" -d "|" -t xml

      I have the airline tweets.xml and the two jar files onlh.jar and kvclient-1.2.123.jar in the deploy directory. When I unzip the package it does NOT contain the directory OLH (as the above command shows) so that is one issue with above. Also the ; throws JAVA usage errors in above.
      I have run the following:

      [cloudera@localhost deploy]$ java -cp onlh.jar -jar kvclient.jar oracle.kv.sample.Loader -i airline_tweets_search-03-01-2012-082206.xml -m "US <userID> " -n "<userName>" -v "<userName> <userID>" -d "|" -t xml

      My output:

      11gR2.2.0.39

      (I do not receive an invalid message validation error as described in sample java files. I have tried many variations of above. Also, the sample in README.txt step 6 also does not align with the documentation in the java file <tagname1> <tagname2> usage. I am able to run step 5 to see the usage of the arguments.

      I am out of options on how to fix this and would greatly appreciate some advice asap for a demo that I am building. I definitely need to have this working so I can then load my own cvs file (with a few tweaks to the arguments). I am a beginner JAVA programmer so explanations with examples are greatly helpful.
      Thank you
        • 1. Re: Oracle NoSQL Database Loader with latest EE does not work
          Charles Lamb
          1002850 wrote:
          I am unable to run the Oracle NoSQL Database Loader to load data at: http://www.oracle.com/technetwork/products/nosqldb/documentation/index.html which is included as documentation with the latest download of Oracle NoSQL. I have downloaded the EE onto my Unix machine and have JAVA version:
          "1.7.0_17" running.

          (I am running KVlite. I was able to run the Hello Big Data World example.)

          Here is step 6 in the README.txt file that I am unable to run.6. To load the content of tweeter feed into the store run this command:
          $java -cp SAMPLE_HOME/OLH/ONLH/deploy/onlh.jar;SAMPLE_HOME/OLH/ONLH/lib/nosql/kvclient-1.2.123.jar oracle.kv.sample.Loader -i SAMPLE_HOME/OLH/ONLH/deploy/airline_tweets_search-03-01-2012-082206.xml -m "US <userID> " -n "<userName>" -v "<userName> <userID>" -d "|" -t xml
          I don't think this example is part of the NoSQL Database distribution. It looks to me like it is part of the OLH distribution. Perhaps you should address your question to that forum instead?

          Big Data Connectors/Hadoop

          Charles
          • 2. Re: Oracle NoSQL Database Loader with latest EE does not work
            Charles Lamb
            A couple of things. You don't say what happens when you try step 6. I note that your classpath has kv-1.2.123 in it which is not the latest version of NoSQL Database that you say you downloaded. So if it's some classpath error or class not found, then you might try using the correct kv-n.m.o.jar file.

            Charles
            • 3. Re: Oracle NoSQL Database Loader with latest EE does not work
              1005853
              Thank you Charles for responding.

              This package is part of the NOSQL distribution. It has nothing to do with loading data into Hadoop. It is not part of OLH. It loads a tweet xml file into Oracle NoSQL. The link is the documentation tab http://www.oracle.com/technetwork/products/nosqldb/documentation/index.html and under Demo/Sample Programs it has a link titled Oracle NoSql Database Loader which is a zip file called sample-oracle-nosql-db-loader-1651759.zip. In this zip file is the sample jar files that are included to run the loader.


              In my previous post I provided the line that I am using and my output. It is the following:

              [cloudera@localhost deploy]$ java -cp onlh.jar -jar kvclient.jar oracle.kv.sample.Loader -i airline_tweets_search-03-01-2012-082206.xml -m "US <userID> " -n "<userName>" -v "<userName> <userID>" -d "|" -t xml

              My output:

              11gR2.2.0.39
              Note in above: I used kvclient.jar which is the jar file from my latest Oracle NoSQL EE lib directory. I do not see any kv-m.n-o.jar in my lib directory (see my lib directory below). Oracle's examples for NoSQL tests (HelloBigDataWorld) in their documentation uses kvclient.jar for this release.

              -------------------------------------------------------------
              I also ran the following (kvclient-1.2.123.jar). Using old jar file in the DBloader zip file.
              java -cp onlh.jar -jar kvclient-1.2.123.jar oracle.kv.sample.Loader -s kvstore -h localhost.localdomain -i airline_tweets_search-03-01-2012-082206.xml -m "US <userID><userName>" -n "<userName>" -v "<userName> <userID><searchType><text>" -t xml
              My output:
              11gR2.2.0.39

              I am thinking that this Oracle NoSql database loader package zip file was not updated with the latest release of Oracle NoSQL client.

              Here are the jar libraries included with the 2.2.0.39 EE release:

              [cloudera@localhost lib]$ pwd
              /home/cloudera/Oracle_nosql/kv-2.0.39/lib
              [cloudera@localhost lib]$ ls
              avro.jar jetty-continuation.jar jetty-util.jar kvstore.jar
              gwt-servlet.jar jetty-http.jar jetty-webapp.jar nosql.mib
              jackson-core-asl.jar jetty-io.jar jetty-xml.jar servlet-api.jar
              jackson-mapper-asl.jar jetty-security.jar kvclient.jar
              jdmkrt.jar jetty-server.jar kvcoherence.jar
              je.jar jetty-servlet.jar kvstore-ee.jar


              Please help me as I really need to get the tweets data loaded into the Oracle nosql database. This is not something I took from someplace else in an Oracle site. I downloaded it from the ORACLE NO SQL site. I think this is an Oracle issue of not having this example running with latest EE for Linux. Please can you help me asap?

              Thank you
              • 4. Re: Oracle NoSQL Database Loader with latest EE does not work
                Charles Lamb
                >
                [cloudera@localhost deploy]$ java -cp onlh.jar -jar kvclient.jar oracle.kv.sample.Loader -i airline_tweets_search-03-01-2012-082206.xml -m "US <userID> " -n "<userName>" -v "<userName> <userID>" -d "|" -t xml
                The README says to put the kvclient and the onlh.jar in the -cp, not onlh.jar in the cp and kvclient as the -jar arg. If you move the kvclient.jar to the -cp

                -cp only.jar:.../kvclient.jar

                it will work.

                Charles
                • 5. Re: Oracle NoSQL Database Loader with latest EE does not work
                  1005853
                  Thank you very much Charles!! That was it. I want to summarize to help others as changes are needed to the README.txt step 6,7 and 8:

                  In Oracle NoSQL Database Loader README.txt step 6 recommends:

                  6. To load the content of tweeter feed into the store run this command:
                  $java -cp SAMPLE_HOME/OLH/ONLH/deploy/onlh.jar;SAMPLE_HOME/OLH/ONLH/lib/nosql/kvclient-1.2.123.jar oracle.kv.sample.Loader -i SAMPLE_HOME/OLH/ONLH/deploy/airline_tweets_search-03-01-2012-082206.xml -m "US <userID> " -n "<userName>" -v "<userName> <userID>" -d "|" -t xml

                  These are the changes needed to run the sample DB Loader with latest Oracle No SQL 11gR2.2.0.39 which now has: kvclient.jar:

                  1. The above command shows path of SAMPLE_HOME/OLH/ONLH/deploy/. When you unzip, OLH is not present and is not needed.
                  The path is: SAMPLE_HOME/ONLH/deploy/

                  2. There is a ';' between onlj.jar and SAMPLE_HOME that is inaccurate. Use ':'.

                  3. kvclient-1.2.123.jar is from an older Oracle NOSQL client. The latest kv jar as of this email: kvclient.jar needs to be used. You can move the kvclient.jar file from your Oracle NOSQL /lib file over to deploy (in the SAMPLE_HOME path) or reference the path to kvclient.jar. I had both jar files in the deploy directory along with the data file.

                  Here's what the command should be with changes mentioned above:
                  java -cp onlh.jar:kvclient.jar oracle.kv.sample.Loader -i airline_tweets_search-03-01-2012-082206.xml -m "US <userID> " -n "<userName>" -v "<userName> <userID>" -d "|" -t xml

                  OUTPUT:
                  Validation was successful.
                  Total 9993 records inserted into the KV-Store.
                  Note: the real count of unique keys could be less.
                  • 6. Re: Oracle NoSQL Database Loader with latest EE does not work
                    Charles Lamb
                    1002850 wrote:
                    Thank you very much Charles!! That was it. I want to summarize to help others as changes are needed to the README.txt step 6,7 and 8:

                    In Oracle NoSQL Database Loader README.txt step 6 recommends:

                    6. To load the content of tweeter feed into the store run this command:
                    $java -cp SAMPLE_HOME/OLH/ONLH/deploy/onlh.jar;SAMPLE_HOME/OLH/ONLH/lib/nosql/kvclient-1.2.123.jar oracle.kv.sample.Loader -i SAMPLE_HOME/OLH/ONLH/deploy/airline_tweets_search-03-01-2012-082206.xml -m "US <userID> " -n "<userName>" -v "<userName> <userID>" -d "|" -t xml

                    These are the changes needed to run the sample DB Loader with latest Oracle No SQL 11gR2.2.0.39 which now has: kvclient.jar:

                    1. The above command shows path of SAMPLE_HOME/OLH/ONLH/deploy/. When you unzip, OLH is not present and is not needed.
                    The path is: SAMPLE_HOME/ONLH/deploy/
                    Ummm, OLH was present in the package that I downloaded...

                    >
                    2. There is a ';' between onlj.jar and SAMPLE_HOME that is inaccurate. Use ':'.
                    Use ; on Windows and : on Linux/Solaris.
                    • 7. Re: Oracle NoSQL Database Loader with latest EE does not work
                      1005853
                      I stand corrected. I misread the README.txt instructions and created SAMPLE_HOME where OLH resided.

                      Thank you for the unix vs linux clarification. Definitely needed.