1 Reply Latest reply on Jan 15, 2013 4:53 PM by Charles Lamb

    External table


      I'm trying the new feature in v2 - External table and I got the following error after doing all the required steps:

      SQL*Plus: Release Production on Mon Jan 14 23:57:19 2013

      Copyright (c) 1982, 2011, Oracle. All rights reserved.

      Connected to:
      Oracle Database 11g Enterprise Edition Release - 64bit Production
      With the Partitioning, OLAP, Data Mining and Real Application Testing options

      SQL> select * from nosql_data;
      select * from nosql_data
      ERROR at line 1:
      ORA-12801: error signaled in parallel query server P000
      ORA-29913: error in executing ODCIEXTTABLEFETCH callout
      ORA-29400: data cartridge error
      KUP-04095: preprocessor command /u01/nosql2.0/kv-2.0.23/exttab/bin/nosql_stream
      encountered error "/u01/nosql2.0/kv-2.0.23/exttab/bin/nosql_stream: line 18:
      java: No such file or directory"

      SQL> !ls /u01/nosql2.0/kv-2.0.23/exttab/bin/nosql_stream



      As you see, the file is exist, so I don't understand what is the problem.

      when I do the following command, I get answers:

      [oracle@MyHostName bin]$ ll
      total 8
      -rwxr-xr-x 1 oracle oracle 623 Jan 14 23:52 nosql_stream
      -r-xr-xr-x 1 oracle oracle 483 Jan 10 16:25 ORIGINAL_nosql_stream.ORIGINAL
      [oracle@MyHostName bin]$
      [oracle@MyHostName bin]$
      [oracle@MyHostName bin]$ pwd
      [oracle@MyHostName bin]$
      [oracle@MyHostName bin]$ cat nosql_stream

      # See the file LICENSE for redistribution information.
      # Copyright (c) 2010, 2012 Oracle and/or its affiliates. All rights reserved.
      # Fill in site-appropriate values for PATH, KVHOME, and CLASSPATH
      # This script will be executed by the Oracle Database server.
      # If you are using user-specified Formatters, by sure to include their home
      # in the CLASSPATH.

      export PATH=$PATH
      export KVHOME="/u01/nosql2.0/kv-2.0.23"
      #export CLASSPATH="$KVHOME/lib/kvstore-2.0.23.jar"
      export CLASSPATH="/u01/nosql2.0/kv-2.0.23/lib/kvstore-2.0.23.jar":"/u01/nosql2.0/kv-2.0.23/examples"
      java oracle.kv.exttab.Preproc $*
      [oracle@MyHostName bin]$
      [oracle@MyHostName bin]$ ./nosql_stream /home/oracle/exercises/noSQL/ExternalTableLocation/nosql.dat

      user9@example.com|M|#9 Example St, Example Town, AZ|999.999.9999
      user8@example.com|F|#8 Example St, Example Town, AZ|888.888.8888
      user6@example.com|F|#6 Example St, Example Town, AZ|666.666.6666
      user2@example.com|F|#2 Example St, Example Town, AZ|222.222.2222
      user5@example.com|M|#5 Example St, Example Town, AZ|555.555.5555
      user0@example.com|F|#0 Example St, Example Town, AZ|000.000.0000
      user1@example.com|M|#1 Example St, Example Town, AZ|111.111.1111
      user3@example.com|M|#3 Example St, Example Town, AZ|333.333.3333
      user4@example.com|F|#4 Example St, Example Town, AZ|444.444.4444
      user7@example.com|M|#7 Example St, Example Town, AZ|777.777.7777


      Thanks in advanced,
        • 1. Re: External table
          Charles Lamb

          The problem is that the "java" command is not in $PATH in the Oracle DB environment. You could try to either explicitly put the directory that holds java in the PATH in the nosql_stream script or just put the path right in line 18.