Java Compilation Error Package Oracle.jdbc Does Not Exist
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings package oracle.jdbc.driver does not exist java and policies of this site About Us Learn more about Stack Overflow error package oracle.jdbc.pool does not exist the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation package oracle jdbc driver does not exist netbeans Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; package oracle.jdbc.driver does not exist maven it only takes a minute: Sign up package oracle.jdbc.driver does not exist after setting class path up vote 1 down vote favorite I'm trying to learn Java DataBase. When I try to load driver by Class.forName("oracle.jdbc.driver.OracleDriver"); it works fine ( Mean no Exception thrown ) But when I tried to register it using DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); I got the following exception.
Import Oracle.jdbc.pool.oracledatasource Does Not Exist
DriveManage.java:9: error: package oracle.jdbc.driver does not exist DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); ^ 1 error I'm using ojdbc6.jar that I have in the following directory. C:\Program Files\Java\jre1.8.0_73\lib\ext After searching I found that I need to set class path too. I set C:\Program Files\Java\jre1.8.0_73\lib\ext to Environment Variables. But It still not working. Any Solution? As Advised in comment to use .jar in class path. I go to control panel then edit the Computer Environment Variables and there add this link after ; C:\Program Files\Java\jre1.8.0_73\lib\ext\ojdbc6.jar but it still not working. I also tried C:\app\OracleHome\product\12.1.0\dbhome_1\jdbc\lib\ojdbc6.jar but it also not working. java oracle jdbc share|improve this question edited Apr 9 at 9:52 asked Apr 9 at 8:18 user6117584 check your lib folder inside web-inf –manikant gautam Apr 9 at 8:19 Possible duplicate of Connect oracle 11g database using java 1.7 –Ducaz035 Apr 9 at 8:28 @manikantgautam where is that folder? –user6117584 Apr 9 at 8:28 Add the jar not the folder containing the jar. –Elliott Frisch Apr 9 at 9:23 @ElliottFrisch adding that still no
Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: Beginning
Package Oracle.jdbc.driver Does Not Exist Linux
Java Package oracle.sql does not exist bob reilly Ranch Hand package oracle.sql does not exist Posts: 44 posted 6 years ago I'm attempting to compile a java file - this is ojdbc14.jar free download a simple compile - no eclipse - I'm using notepad for testing java concepts (accessing Clob data). That said when attempting to compile my code I'm http://stackoverflow.com/questions/36514443/package-oracle-jdbc-driver-does-not-exist-after-setting-class-path getting error messages indicating: C:\JFiles>javac CLOBFileExample.java CLOBFileExample.java:37: package oracle.sql does not exist import oracle.sql.*; ^ CLOBFileExample.java:40: package oracle.jdbc does not exist import oracle.jdbc.*; ^ CLOBFileExample.java:230: cannot resolve symbol symbol : class CLOB location: class CLOBFileExample CLOB xmlClob = null; ^ CLOBFileExample.java:256: cannot resolve symbol symbol : class OracleResultSet location: class CLOBFileExample xmlClob https://coderanch.com/t/496143/java/java/Package-oracle-sql-exist = ((OracleResultSet) rset).getCLOB("xml_Clob_field"); ^ CLOBFileExample.java:325: cannot resolve symbol symbol : class CLOB location: class CLOBFileExample CLOB xmlClob = null; ^ CLOBFileExample.java:346: cannot resolve symbol symbol : variable rseClobt location: class CLOBFileExample rseClobt.next(); ^ CLOBFileExample.java:347: cannot resolve symbol symbol : class OracleResultSet location: class CLOBFileExample xmlClob = ((OracleResultSet) rset).getCLOB("xml_Clob_field"); ^ 7 errors These error messages make me suspect that the classpath is not configured properly. When I review that - there doesn't appear to be any reference to an oracle jar file. I do have an oracle client configured on my workstation. BTW - "java -version" yields: "java version "1.6.0_20". Furthermore the oracle environment is "10.2.0.3". Configuring the classpath in not something I'm comfortable with - (like anything else I'll back up before doing anything). Is this the correct route to go? Please advise. Thank you. Ed Ward Ranch Hand Posts: 147 posted 6 years ago You are correct in that classpath is the likely c
oracle.jdbc does not exist" If this is your first visit, be sure to check out the FAQ by clicking the link http://www.dbasupport.com/forums/showthread.php?43580-Error-quot-package-oracle-jdbc-does-not-exist-quot above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 6 of 6 Thread: Error: "package oracle.jdbc does not exist" Tweet Thread Tools Show Printable Version Email this Page… Subscribe does not to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 06-28-2004,08:45 PM #1 tryston02 View Profile View Forum Posts Junior Member Join Date Jun 2004 Posts 2 Error: "package oracle.jdbc does not exist" Hello, I'm trying to write a simple Java example that pulls from an Oracle Database, however, I keep getting does not exist this error when I try to compile it. ----------------------------------------------------------------- Test/FirstExample.java [22:1] package oracle.jdbc does not exist Class.forName(oracle.jdbc.driver.OracleDriver); ^ 1 error Errors compiling FirstExample. ----------------------------------------------------------------- Here's what my classpath is set to: CLASSPATH=.;D:\Oracle\ora92\jdbc\lib\ojdbc14.jar;D:\Oracle\ora92\jdbc\lib\ocrs12.zip Here's what my path is set to: PATH=D:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\j2sdk1.4.2_04\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Syst em32\Wbem Here's what my Java_home is set to: JAVA_HOME=C:\j2sdk1.4.2_04 Here's what my oracle_home is set to: ORACLE_HOME=D:\Oracle\ora92 I'm using the 1.4.2 Java SDK and I'm running the Oracle Server on the same box that I'm developing on (no Oracle client is installed) Here is my code: ------------------------------------------------------------------------ package Test; import java.sql.*; public class FirstExample { public static void main(String[] args){ //declare Connection and Statement Objects Connection myConnection = null; Statement myStatement = null; try{ //register the Oracle JDBC drivers Class.forName(oracle.jdbc.driver.OracleDriver); //create a connection object, and connect to the database as system //using the oracle JDBC Thin driver myConnection = DriverManager.getConnection("jdbc:oracle:thin@dev:1521:ORACLASS", "system", "password"); //create a statement object myStatement = myConnection.createStatement(); ResultSet myResultSet = myStatement.executeQuery("SELECT user, sysdate " + "FROM dual"); ...deleted rest of script ---