1 Reply Latest reply: May 16, 2010 2:09 AM by 843789 RSS

    How can I install JDBC drivers for Oracle?!?....

      i have a program that has this line:
      import oracle.jdbc.pool.OracleDataSource;

      that gives this error when I compile it:
      package oracle.jdbc.pool does not exist

      So I think I need to install JDBC drivers for Oracle. (?)

      I went here: [http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_111060.html]
      and downloaded the files for JDBC Thin.

      Then I followed this: [http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/111070_readme.html]
      by entering these commands (I'm using Ubuntu):
      export CLASSPATH=$CLASSPATH:/path/to/files/ojdbc6.jar
      export CLASSPATH=$CLASSPATH:/path/to/files/orai18n.jar
      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/files

      When I type echo $CLASSPATH I can see that those commands worked, but it hasn't made any difference when I try to compile.
      I still get the same error. Is it because I didn't do anything about the .so files? The readme page didn't mention them in the installation section.

      Please help! I am so stuck...
        • 1. Re: How can I install JDBC drivers for Oracle?!?....
          I don't think you need the shared libraries (.so files) and given what I saw when I glanced at those pages, I don't think they'd even work for you, although maybe I just didn't read enough of it.

          What happens when you type
          javap oracle.jdbc.pool.OracleDataSource
          on the command line?

          How are you invoking javac? Are you perhaps passing a classpath argument?

          Are you sure that the path to the jar files is correct? Are the paths relative?