Package (import oracle.jdbc.driver.*) not found -----URGENT--------

Hi All,
i've been using oracle thin driver for oracle 9i server since a long. but now it gives error like
package import oracle.jdbc.driver.* not found
it seems some problem in classpath.
but i've inludeed classes111.zip/classes12.zip to classpath and with this was working fine. dunno what's the problem . kindly mail me at the earliest to:[email protected]
also i'm working with Tomcat server.
to run the servlet i don't want to type the absolute url like
http://localhost:8080/servlet/test rather http://localhost/test .so how to config it . can ne one tell me asap.
with thanx abd rgds
Sayed
so can u tell me

1. Copy classes12.zip to %TOMCAT_HOME\common\lib
2. Go to %TOMCAT_HOME\common\lib dir, rename classes12.zip to classes12.jar
I think someone else has reply same problem before, next time you can do a search before post your problem.

Similar Messages

  • Import oracle.jdbc.driver.* problem.

    I've got classes111b.zip from this site, and put it into my $ORACLE_HOME/jdbc/lib; add this: "$ORACLE_HOME/jdbc/lib/classes111b.zip" to my CLASSPATH; use env command, I can see it, but when I visit my jsp page, there occured an error:
    Error: 500
    Location: /tmp/connectdb.jsp
    Internal Servlet Error:
    org.apache.jasper.JasperException: Unable to compile class for JSP/jakarta-tomcat/work/localhost_8080/_0002ftmp_0002fconnectdb_0002ejspconnectdb_jsp_7.java:20: Package oracle.jdbc.driver not found in import.
    import oracle.jdbc.driver.*;
    And jdbc readme file says:
    The Oracle installer installs the JDBC Drivers in the
    [ORACLE_HOME]/jdbc directory.
    Where is the Oracle installer? How could I do?
    Thanks in advance.

    Hello
    here is the modified code
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class Oracle_Test
    public static void main(String args[])
    String sql = "";
    String strdisp = "";
    Connection con = null;
    //Statement cs = null;
    CallableStatement cs = null;
    ResultSet rs = null;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    System.out.println("Hello 1");
    //con = DriverManager.getConnection("jdbc:oracle:thin:@192.1.1.70:1521:epatra","kamna_local","kamna");
    con = DriverManager.getConnection("jdbc:oracle:thin:@10.8.51.182:1521:DEVPG","RINGERS","RINGERS");
    System.out.println("Hello 2");
    try
    CallableStatement proc = con.prepareCall("{ call PHONEGEN.HOME_MDN_SEARCH_RINGER(?, ?, ?, ?, ?, ?) }");
    proc.setString(1, "2231015897");
    proc.setString(2, "1071706417");
    proc.registerOutParameter(3, OracleTypes.VARCHAR);
    proc.registerOutParameter(4, OracleTypes.VARCHAR);
    proc.registerOutParameter(5, OracleTypes.VARCHAR);
    proc.registerOutParameter(6, OracleTypes.VARCHAR);
    System.out.println("Hello 3");
    boolean x = cs.execute();
    String homemin = proc.getString(3);
    String homemdn = proc.getString(4);
    String phoneType = proc.getString(5);
    String outStatus= proc.getString(6);
    System.out.println("Hello 3");
    proc = null;
    con.close();
    con = null;
    catch(NullPointerException sqle)
    sqle.printStackTrace();
    catch(Exception ex)
    ex.printStackTrace();
    System.out.println("error in finding class "+ex);
    The Exception comes at this
    CallableStatement proc = con.prepareCall("{ call PHONEGEN.HOME_MDN_SEARCH_RINGER(?, ?, ?, ?, ?, ?) }");
    And here is the output when the rpogram runs....
    Hello 1
    Hello 2
    Hello 3
    java.lang.NullPointerException
    at Oracle_Test.main(Oracle_Test.java:31)
    Thanks for your help.....
    Looking for a solution soon
    Regards
    Abhinav

  • JDBC Driver not found when connecting to Data Federator XI 3.0 SP3

    Hello,
    I am trying to connect Crystal 2008 to Data Federator however I am getting the Error
    Failed to open connection.
    Details: JDBC Driver not found.
    The JDBC Drivers are installed and working for the Universe Designer, however I am unable to get it working for Crystal. I am using the following connection parameters on Crystal:
    Connection URL: jdbc:datafederator://<<servername>>:3055/<<catalog>>
    Database Classname: com.businessobjects.datafederator.jdbc.DataFederatorDriver
    Any Advice on what I may have missed?

    The issue was solved, thanks to Patric Wan:
    u201CFailed to open the connection. Details: JDBC driver not found.u201D
    This means Data Federator JDBC driver was not added to:
    C:\Program Files\Business Objects\common\<version>\java\CRConfig.xml
    How to connect the Data Federator Server using JDBC?
    1. Retrieve the following files from the machine where Data Federator is installed, from the directory [data-federator-installation-dir]/JdbcDriver/lib.
        - thindriver.jar
        - avalon-framework-4.1.5.jar
        - jacorb.jar
        - log4j-1.2.8.jar
        - logkit-1.2.jar
    2. Copy these files to a directory of your choice ([your-jdbc-driverdirectory]).
    3. Add [your-jdbc-driver-directory]/thindriver.jar to CRConfig.xml   <Add to Classpath tag, you can refer to original sample.CRConfig.xml should be at: C:\Program Files\Business Objects\Common\4.0\java\CRConfig.xml, or search your BOBJ products install to find this file>
    4. URL: jdbc:leselect://<host>[:<port>][/[<catalog>]][[;param-name=value]*]
    Class Name : LeSelect.ThinDriver.ThinDriver
    Edited by: Craig Sander on Feb 12, 2011 8:22 PM

  • Oracle.jdbc.oracledriver not found

    Hi,
    i have this code .. given below. I installed the oracle client version 8. but everytime i run this code i get the oracledriver not found message. I put the oracle jdbc drivers in the class path. but the code just refuses to compile.
    Can anyone tell me what is wrong here. i have a funny feeling that the classpath is not set properly. let me know whats wrong here.
    ps: i havent set the system DSN - coz i am getting stuck at the drivers itself.
    It says the following .
    AccessDB.java:26: Class oracle.jdbc.driver.OracleDriver not found.
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    i have the CLASSPATH=D:\oracle\ora81\jdbc\lib\classes111.zip;D:\oracle\ora81\jdbc\lib;D:\oracle\ora81\jdbc\lib\classes12.zip;D:\oracle\ora81\jdbc\lib\nls_charset11.zip
    the code is as follows
    //: AccessDB.java
    import java.sql.*;
    * Access the Database through JDBC
    public class AccessDB {
    private Connection con = null;
    private Statement stmt = null;
    private DatabaseMetaData meta = null;
    private String dbURL;
    private String dbUser;
    private String dbPassword;
    * Connects to JDBC driver
    public void connect(String dbURL, String dbUser, String dbPassword){
    try {
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection(dbURL,dbUser,dbPassword);
    stmt = con.createStatement();
    meta = con.getMetaData();
    catch(Exception e){
    System.out.println("connect: " + e);
    System.exit(0);
    * Disconnects from JDBC driver
    public void disconnect(){
    try {
    if (stmt != null) stmt.close();
    if (con != null) con.close();
    catch(Exception e){
    System.out.println("disconnect: " + e);
    System.exit(0);
    * Retrieves a Statement object
    public Statement getStatement(){
    return stmt;

    hi,
    i have some problem in JSP oracle connectivity,
    I'm running JRUN, PWS under WIN98.
    the following is the code for Oracle connection from JSP
    <%@ page import="java.sql.*" %>
    <HTML>
    <HEAD>
         <title>Example JSP</title>
    </HEAD>
    <BODY>
    <table width="50%" border=1>
         <th>Table Name</th>
         <th>Table Type</th>
    <%
    java.sql.Connection con;
    java.sql.ResultSet rs;
    java.sql.Statement sta;
              Class.forName("oracle.jdbc.driver.OracleDriver");
              con=java.sql.DriverManager.getConnection("jdbc:oracle:thin:@NTSERVER1:1521:orcl","DOHMS","TA");
              sta=con.createStatement();
              rs=sta.executeQuery("select * from USERS");
              while(rs.next()) {
                        out.println("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString(2)+"</td></tr>");
    %>
    </table>
    <BODY>
    the following is the error:
    Exception thrown on line '21' from page 'C:\\Program Files\\Allaire\\JRun\\servers\\default\\demo-app\\jsp\\dbtest.jsp'.
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver [oracle.jdbc.driver.OracleDriver]
         at allaire.jrun.servlet.JRunServletLoader.loadClass(../servlet/JRunServletLoader.java:430)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
         at allaire.jrun.jsp.JSPClassLoader.loadClass(../jsp/JSPClassLoader.java:118)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:325)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:135)
         at jrun__jsp__dbtest2ejspf._jspService(jrun__jsp__dbtest2ejspf.java:49)
         at allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
         at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
         at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:196)
         at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
         at allaire.jrun.session.JRunSessionService.service(../session/JRunSessionService.java:1082)
         at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
         at allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDispatcher.java:89)
         at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
         at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
         at allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
         at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
         at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
         at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)
    ---------------

  • SQL Server JDBC Driver Not Found!!!!!!!!!

    Guys,
    I really need help with this one coz it seems I've done everything and still things aren't working.I'm running a Win2k Server with Sql Server 2000,now I know that I need the sql server 2000 Jdbc drivers inorder for me to connect to the sql server on my machine I've downloaded and installed the drivers successfully at least I think it's successfull coz when I go to the administrative tools option I see that the drivers have been installed.
    When I try to connect to the server I get an error:
    Class loading errorjava.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    despite the fact I have installed the drivers.
    If you've got any idea on how to solve this problem,I would appreciate it if you filled me in.

    Notice that you aren't using the MSSQL JDBC driver anymore but the Sun JDBC-OBDC-Bridge now which is far less powerfull than the MSSQL driver.
    If you want to switch back to the MSSQL driver:
    Regarding the setup of the driver. Not setup required - only for extracting the driver JAR files. Put the 3 JAR files into the classpath of your app server where web-apps can see them. At least you can always put them into the WEB-INF\lib directory of your web-app, where the driver is visible only to your web-app.
    If you would like to configure the driver parameter in your web.xml use context init-parameters for web-app wide scope or servlet/JSP init-parameters for servlet/JSP only scope.
    Michael

  • Data Access Objects : JDBC Driver Not Found

    Hi,
    I am having a strange problem accessing JDBC Driver ( for Informix Database, if this
    information helps )
    I am using Data Access Objects ( DAOs ) to fetch multiple records.
    The DAO is accessed from Session Bean for this case.
    The constructor of the DAO does the JNDI lookup for the TxDataSource
    and set it to a class attribute of the DAO. This DataSource is pointing
    to a connection pool
    In the getConnection() private method if DAO we use this DataSource
    to pickup a onnection from the pool and fire a sql query.
    This public method say getMultipleRecords( query conditions ) of DAO
    returns a number of macthing records to the Session Bean.
    This approach works fine in general. But sometimes I get an
    java.sql.SQLException
    SQLException ERROR MESSAGE is:
    "Error accessing jdbc driver: driverURL = jdbc:weblogic:pool:myConnPool, props= {enableTwoPhaseCommit=true,
    connectionPoolID=myConnPool}"
    Once this exception occurs every time the method is called the same exception keep
    coming.
    Once I restart the server this API starts working again.
    Could anyone give any reason why this exception might occur.
    Please send an e-mail to [email protected] while replying to this message.
    Thanks in advance
    Gunajit

    Hi Gunajit
    you need to ensure that the connections are properly closed. If you are
    closing the connections properly, increase the number of connections in the
    connection pool.
    hth
    sree
    "Gunajit" <[email protected]> wrote in message
    news:3ce082ca$[email protected]..
    >
    Hi,
    I am having a strange problem accessing JDBC Driver ( for InformixDatabase, if this
    information helps )
    I am using Data Access Objects ( DAOs ) to fetch multiple records.
    The DAO is accessed from Session Bean for this case.
    The constructor of the DAO does the JNDI lookup for the TxDataSource
    and set it to a class attribute of the DAO. This DataSource is pointing
    to a connection pool
    In the getConnection() private method if DAO we use this DataSource
    to pickup a onnection from the pool and fire a sql query.
    This public method say getMultipleRecords( query conditions ) of DAO
    returns a number of macthing records to the Session Bean.
    This approach works fine in general. But sometimes I get an
    java.sql.SQLException
    SQLException ERROR MESSAGE is:
    "Error accessing jdbc driver: driverURL = jdbc:weblogic:pool:myConnPool,props= {enableTwoPhaseCommit=true,
    connectionPoolID=myConnPool}"
    Once this exception occurs every time the method is called the sameexception keep
    coming.
    Once I restart the server this API starts working again.
    Could anyone give any reason why this exception might occur.
    Please send an e-mail to [email protected] while replying to this
    message.
    >
    Thanks in advance
    Gunajit

  • [Sun Studio 11] Classpath issue: com.mysql.jdbc.Driver not found

    Greetings !!
    I'm trying in an Applet to connect to a mysql database but the Applet fails everytime.
    It works perfectly in console environnement with the same javaconnector.
    I read this:
    +Classpath. Specifies the path to the classes that the IDE uses. By default the IDE uses its internal class path, which includes all mounted filesystems and various directories in the IDE's installation and user directories. The IDE ignores your CLASSPATH environment variable. Click the ellipsis button to display a property editor in which you can change the class path settings.+
    So my CLASSPATH environnement variable is passed by (as I redoubted) but I don't know why even specifying classpathes in Options/Building/Compiler Types/internal compilations/expert/class path the I got the same behaviour from the Applet... is there another way to specify that this Driver* is located in */usr/share/java/mysql-connector-java-5.1.7-bin.jar* ??
    I also added the jar files in Options/IDE configuration/System/File System settings/java librairies but same behaviour again... but when compiling the output windows indicates that it has finished jdbc... that's all, the Applet still can't open a connexion with the mysql server...
    Can somebody could explain to me how set up the IDE to use this javaconnector in order to connect to the mysql database ?
    Thank you for your time...
    Hurukan

    This forum is about the tools provided with Sun Studio, the development system for C, C++, and Fortran programming.
    Since your question is about Java, you are more likely to get a helpful answer in a Java forum. Go to forums.sun.com, and look under the Java heading.
    Or if your question is about Netbeans, try a forum at netbeans.org

  • How to import oracle.jdbc.OracleConnection

    I'm sure this is something I'm supposed to know but it has been about a year since I have worked with JDeveloper and I have forgotten a few things.
    I am looking at some code that includes import oracle.jdbc.OracleConnection with a wavy red line that gives the message "import oracle.jdbc.OracleConnection not found."
    Where should I start to look for how to repair this?
    Thanks,
    Gregory

    In your project properties, in the libraries and classpath section, add the library "Oracle JDBC".

  • IPlanet Web Server  gives classnot found "oracle.jdbc.driver.OracleDriver "

    I have installed iplaet web server 6 eval. copy on red hat linux 6.2 , oracle 8i 8.1.6 having default classpath with
    /usr/local/jdk1.2.2:/usr/local/jsdk.jar:/usr/local/jdk1.2.2/oracle.jar
    when we run a servlet it gives classnot found "oracle.jdbc.driver.OracleDriver "
    Any one can give me where to place oracle.jar or how to overcome from this error
    the code is
    import java.util.*;
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import oracle.jdbc.driver.*;
    * This is a simple example of an HTTP Servlet. It responds to the GET
    * and HEAD methods of the HTTP protocol.
    public class Hello2 extends HttpServlet
    public void doGet (HttpServletRequest request,HttpServletResponse response) throws ServletExc
    eption, IOException
    PrintWriter out;
    String title = "12Example iPlanet JServ Servlet";
    response.setContentType("text/html");
    out = response.getWriter();
    Statement stmt=null;
    ResultSet rs=null;
    Connection con;
    out.println("<H2> iPlanet is working!!</H2>");
    try
    // String url = "jdbc:oracle:thin:@80.0.0.2:1521:sahara";
    // Class.forName("oracle.jdbc.driver.OracleDriver");
    con=DriverManager.getConnection("jdbc:oracle:thin:@(description=(address=(host=80
    .0.0.2)(protocol=tcp)(port=1521))(connect_data=(sid=star)))","zigma","zigma");
    // con = DriverManager.getConnection(url, "rahul", "rahul");
    String sQuery2="select zrsbname from zrsbmast where zrsbcode=9999";
    stmt=con.createStatement();
    rs = stmt.executeQuery(sQuery2);
    rs.next();
    /*String sQuery="{call shift20()}";
    cstmt=con.prepareCall(sQuery);
    cstmt.executeQuery(); */
    out.println("<HTML><HEAD><TITLE>");
    out.println(title);
    out.println("</TITLE></HEAD><BODY bgcolor=\"#FFFFFF\">");
    out.println("<H1>"+iCount+"</H1>");
    out.println("<H1>" + title + "</H1>");
    out.println("<H2> Congratulations, iPlanet is working!1<br>");
    out.println("</BODY></HTML>");
    out.close();
    catch(SQLException e1)
    out.println("<p> Error in ");
    out.println("<p> Errmsg="+ e1.getMessage());
    catch(Exception e)
    out.println("<p> Error in ");
    out.println("<p> Errmsg="+ e.getMessage());

    you must be having an administrative console for iplanet
    there the classpath can be set to the required location
    Open the Administrative console for it..

  • Re : Error java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDrive

    Hello All,
    I am writing this simple program which connects to Oracle DB ( 10.2 ). The Java version I have is 1.5.0_13 . I do have oracle client installed. When I run the below code ...I get error
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
            at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:164)
            at OraThin.main(OraThin.java:13)The code I have is :
    import java.io.*;
    import java.sql.*;
    public class OraThin {
      public static void main(String[] args) {
        try {
    System.out.println(System.getProperty ("java.class.path") );
          Connection con=null;
          Class.forName("oracle.jdbc.driver.OracleDriver");
          con=DriverManager.getConnection(
            "jdbc:oracle:thin:@hostname:15282:ServiceName",
            "scott",
            "tiger");
          Statement s=con.createStatement();
          s.execute("SELECT SYSDATE FROM DUAL");
          s.close();
          con.close();
      } catch(Exception e){e.printStackTrace();}
    } Please suggest as to what am I missing, I am not that well versed with Java.
    Thanks in advance,
    Sam

    Hello Paul,
    Thanks for you suggestion. Based on it , I did add the exact jar file in the PATH environmental variable in XP.
    Path=C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar;C:\oraclexe\a
    pp\oracle\product\10.2.0\server\bin;C:\oracle\product\10.2.0\client_1\bin;C:\Ora
    cle\product\10.1.0\Client_1\bin;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin\
    client;C:\j2sdk1.4.2_06\bin;Even after adding the specific jar file *("C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar")* ..I am getting the exact same error. moreover, to verify this I also tried to import import oracle.jdbc.driver.*.....and now my code would not even complie and I get error *(c:\Program Files\Java\jdk1.5.0_13\bin\OraThin.java:3: package oracle.jdbc.driver*
    does not exist ) . I also rebooted my machine just to make sure ...that didnt work either. Also, I changed these jar to be first in the PATH varibale ..to avoid conflict with any later .jar's classes. The code is :
    import java.io.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class OraThin {
      public static void main(String[] args) {
        try {
    System.out.println(System.getProperty ("java.class.path") );
          Connection con=null;
          Class.forName("oracle.jdbc.driver.OracleDriver");
          con=DriverManager.getConnection(
            "jdbc:oracle:thin:@hostname:15282:ServiceName",
            "scott",
            "tiger");
          Statement s=con.createStatement();
          s.execute("SELECT SYSDATE FROM DUAL");
          s.close();
          con.close();
      } catch(Exception e){e.printStackTrace();}
    }What am I missing here!! ?
    Thanks again,
    Sam

  • Oracle JDBC Driver Compile Errors

    I'd like to try out this new Preview Edition but I get the following errors:
    Error(22,8): class oracle.jdbc.driver.OracleCallableStatement is not public; cannot be accessed from outside of package oracle.jdbc.driver
    Error(23,8): class oracle.jdbc.driver.OracleTypes is not public; cannot be accessed from outside of package oracle.jdbc.driver
    These erors occur at the import statements:
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    when I attempt to compile a JDev 10.1.3 project in the 11g Technology Preview Edition. Any idea why?
    TIA,
    Jeff

    We don't support project migration from 10.1.3 to the
    technology preview.
    Does the problem reproduce if you create a new
    project in 11tp?Shay,
    Thanks for the quick response. I created a new application in 11tp from scratch. I created a View Object and pasted the offending code into it and got the same compile errors. I actually got the code about a year ago from Steve's Not Yet Documented Applications. He has since removed the App from the page, changed the code and added it to the Dev Guide. The sample app showed how to bind a View object to a REF Cursor returned from a stored procedure and it looked something like this:
    CallableStatement cs = conn.prepareCall("{?=call package.name(P_CODIGO => ?)}");
    cs.rgisterOutParameter(1,OracleTypes.CURSOR);
    cs.setInt(2,16782);
    cs.executeQuery();
    ResultSet result = ((OracleCallableStatement)cs).getCursor(1);
    Changing the code to look more like what is now in the DEV GUIDE will more than likely work because he eliminates the need for the OracleCallableStatement.
    This brings me to my next point. If migration is not currently supported, will it be when the production release of JDEV 11g is available? Shame on me for just quickly skimming the release notes but when the import wizard ran on my project it did not warn me that the feature is not supported or that problems are likely. Upon resolving the issues with the callable statement, I had significant other compile errors in my jspx pages that will probably not be as trivial to fix. If project upgrades are not performed "easily" it will certainly push the 11g adoption date out considerably.
    Thanks again, your comments are always encouraged.
    Jeff

  • How do I determine JDBC Version? - oracle.jdbc.driver

    The following is my path and classpath and script.
    Path = D:\oracle\ora90\bin;
    D:\oracle\ora90\Apache\Perl\5.00503\bin\mswin32-x86;
    C:\Program Files\Oracle\jre\1.1.8\bin;
    %SystemRoot%\system32;
    %SystemRoot%;
    %SystemRoot%\System32\Wbem;
    C:\Program Files\Common Files\AdaptecShared\System;
    C:\Program Files\Java\j2re1.4.2\bin;
    D:\oracle\ora90\LIB
    classpath = .;
    C:\Program Files\Java\j2re1.4.2\bin;
    D:\oracle\ora90\jdbc\lib\
    JDBCVersion.java
    import java.sql.*;
    import oracle.jdbc.driver.*;
    class JDBCVersion
    public static void main (String args[])
    throws SQLException
    //DriverManager.registerDriver
    //(new oracle.jdbc.driver.OracleDriver());
    // Load the Oracle JDBC driver
    DriverManager.registerDriver
    (new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:scott/tiger@t3100:1521:oracle");
    // Create Oracle DatabaseMetaData object
    DatabaseMetaData meta = conn.getMetaData();
    // gets driver info:
    System.out.println("JDBC driver version is " + meta.getDriverVersion());
    this throws the following:
    D:\oracle\ora90\jdbc\demo\samples\thin\basic\JDBCVersion.java:2: package oracle.jdbc.driver does not exist
    import oracle.jdbc.driver.*;
    ^
    D:\oracle\ora90\jdbc\demo\samples\thin\basic\JDBCVersion.java:14: package oracle.jdbc.driver does not exist
    (new oracle.jdbc.driver.OracleDriver());

    DON'T import the Oracle packages.
    That's all hidden from you by the java.sql code. All you do is register the driver and get a connection:
    Class.forName("driverClassName");
    Connection connection = DriverManager.getConnection("url", "user", "pswd");You might have a "ClassNotFoundException" in your future. I'll bet the JDBC JARs aren't in your CLASSPATH. Make sure they're JARs, not zips. Oracle used to have everything in classes12.zip, but now they've gotten smart and put them in JARs for 9.2.0.1. - MOD

  • Error message when using "import oracle.jdbc.pool.OracleDataSource;" stmt

    hello Guys I have Written a Servlet program. It contains Some JDBC Code. When I try to import a Package "import oracle.jdbc.pool.OracleDataSource;" It was showing an error message saying that that particuler package does not exist.Could you please tell me what shall I do to import that package?

    Add classes12.jar in your classpath S
    --Balaji S                                                                                                                                                                                                               

  • [Macromedia][Oracle JDBC Driver]Numeric overflow

    I am moving from CF 6.1 to CF 9 using Oracle 9i.  I get the following error when I use cfstoredproc to call a procedure in a package: [Macromedia][Oracle JDBC Driver]Numeric overflow.  In spite of throwing the error, the stored procedure seems to execute properly. Has anyone encountered this problem?

    I cannot consistently replicate the problem.  Values that work the first time may not work the second time.  The data is always entered in the database, but sometimes an error message is thrown regardless of the fact that the data was entered into the database. Calling the procedure with PL/SQL works every time.  Here is a dump of the info. from cfcatch:
    The database operation failed.
    Type: Database
    Message: Error Executing Database Query.
    Detail: [Macromedia][Oracle JDBC Driver]Numeric overflow.
    Native Error Code: 0
    SQLState: HY000
    SQL: {call pk_name.proc_name ( (param 1) , (param 2) , (param 3) , (param 4) , (param 5) , (param 6) , (param 7) , (param 8) , (param 9) , (param 10) , (param 11) , (param 12) , (param 13) , (param 14) , (param 15) , (param 16) , (param 17) , (param 18) , (param 19) , (param 20) , (param 21) , (param 22) , (param 23) , (param 24) , (param 25) , (param 26) , (param 27) , (param 28) , (param 29) , (param 30) , (param 31) , (param 32) , (param 33) , (param 34) , (param 35) , (param 36) , (param 37) , (param 38) , (param 39) , (param 40) , (param 41) , (param 42) , (param 43) , (param 44) )}
    Query Error: [Macromedia][Oracle JDBC Driver]Numeric overflow.
    Where:
    (param 1) = [type='INOUT', value='null', sqltype='cf_sql_integer'] ,
    (param 2) = [type='IN', class='java.lang.Integer', value='41014', sqltype='cf_sql_integer'] ,
    (param 3) = [type='IN', class='java.lang.String', value='N', sqltype='cf_sql_char'] ,
    (param 4) = [type='IN', class='java.lang.String', value='N', sqltype='cf_sql_char'] ,
    (param 5) = [type='IN', class='java.lang.String', value='LastName, FirstName ', sqltype='cf_sql_varchar'] ,
    (param 6) = [type='IN', class='java.lang.String', value='12345', sqltype='cf_sql_varchar'] ,
    (param 7) = [type='IN', class='java.lang.String', value='10063', sqltype='cf_sql_varchar'] ,
    (param 8) = [type='IN', class='java.lang.String', value='LastName, FirstName', sqltype='cf_sql_varchar'] ,
    (param 9) = [type='IN', class='java.lang.String', value='(123) 456-7890', sqltype='cf_sql_varchar'] ,
    (param 10) = [type='IN', class='java.lang.String', value='abc_201102_163', sqltype='cf_sql_varchar'] ,
    (param 11) = [type='IN', class='java.lang.String', value='test', sqltype='cf_sql_varchar'] ,
    (param 12) = [type='IN', class='java.lang.String', value='test', sqltype='cf_sql_varchar'] ,
    (param 13) = [type='IN', class='java.lang.String', value='test', sqltype='cf_sql_varchar'] ,
    (param 14) = [type='IN', class='java.lang.String', value='test', sqltype='cf_sql_varchar'] ,
    (param 15) = [type='IN', class='java.lang.String', value='test', sqltype='cf_sql_varchar'] ,
    (param 16) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] ,
    (param 17) = [type='IN', class='java.lang.Integer', value='38', sqltype='cf_sql_integer'] ,
    (param 18) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] ,
    (param 19) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] ,
    (param 20) = [type='IN', class='java.lang.Integer', value='2', sqltype='cf_sql_integer'] ,
    (param 21) = [type='IN', class='java.lang.String', value='EA', sqltype='cf_sql_varchar'] ,
    (param 22) = [type='IN', class='java.lang.String', value='test', sqltype='cf_sql_varchar'] ,
    (param 23) = [type='IN', class='java.lang.String', value='D', sqltype='cf_sql_varchar'] ,
    (param 24) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] ,
    (param 25) = [type='IN', value='null', sqltype='cf_sql_varchar'] ,
    (param 26) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] ,
    (param 27) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] ,
    (param 28) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] ,
    (param 29) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] ,
    (param 30) = [type='IN', value='null', sqltype='cf_sql_integer'] ,
    (param 31) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] ,
    (param 32) = [type='IN', value='null', sqltype='cf_sql_varchar'] ,
    (param 33) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] ,
    (param 34) = [type='IN', class='java.lang.String', value='A5E', sqltype='cf_sql_varchar'] ,
    (param 35) = [type='IN', class='java.lang.String', value='B5', sqltype='cf_sql_varchar'] ,
    (param 36) = [type='IN', class='java.lang.String', value='CEJ', sqltype='cf_sql_varchar'] ,
    (param 37) = [type='IN', class='java.lang.String', value='A', sqltype='cf_sql_varchar'] ,
    (param 38) = [type='IN', class='java.lang.String', value='15', sqltype='cf_sql_varchar'] ,
    (param 39) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] ,
    (param 40) = [type='IN', class='java.lang.String', value='ABC DEF - GHI JK', sqltype='cf_sql_varchar'] ,
    (param 41) = [type='IN', class='java.lang.String', value='ABCD EF1234 GHI JK', sqltype='cf_sql_varchar'] ,
    (param 42) = [type='IN', value='null', sqltype='cf_sql_date'] ,
    (param 43) = [type='OUT', sqltype='cf_sql_integer'] ,
    (param 44) = [type='OUT', sqltype='cf_sql_varchar']

  • Error oracle.sql.* and oracle.jdbc.driver.* not found when using oracle as a database

    I am using oracle as database and weblogic 4.5. I have copied the classes12.zip file in lib directory of weblogic. I am getting the error that oracle.sql.* and oracle.jdbc.driver.* not found when i am importing these packages in a jsp file. what i need to do to import oracle driver packages?I put it in the classpath also.
    Please Advice!
    Thanks in advance
    AnuPama

    Hi Anupama,
    First of all I would be surprised if you would not like to use the connection pooling feature of weblogic (in which case you might not be needing the import the classes directly), and would like to open direct connections to your database. Anyways for doing that I would recommend you to check out the readme doc that ships
    along with the jdbc oracle (classes12.zip etc). I am giving an excerpt over here:
    These are a few simple things that you should do in your JDBC program:
    1. Import the necessary JDBC classes in your programs that use JDBC.
    For example:
    import java.sql.*;
    import java.math.*;
    2. Register the Oracle driver before before calling other JDBC APIs.
    (This is not needed if you are using the JDBC Server-side Internal
    Driver because registration is done automatically in the server.)
    To register the Oracle driver, make sure the following statement
    is executed at least once in your Java session:
    DriverManager.registerDriver(
    new oracle.jdbc.driver.OracleDriver());
    3. Open a connection to the database with the getConnection call.
    Different connection URLs should be used for different JDBC
    drivers. The following examples demonstrate the different URLs.
    For the JDBC OCI8 Driver:
    Connection conn = DriverManager.getConnection(
    "jdbc:oracle:oci8:@<database>",
    "scott", "tiger");
    where <database> is either an entry in tnsnames.ora or a SQL*net
    name-value pair.
    For the JDBC Thin Driver, or Server-side Thin Driver:
    Connection conn = DriverManager.getConnection(
    "jdbc:oracle:thin:@<database>",
    "scott", "tiger");
    where <database> is either a string of the form
    <host>:<port>:<sid> or a SQL*net name-value pair.
    For the JDBC Server-side Internal Driver:
    Connection conn = DriverManager.getConnection(
    "jdbc:oracle:kprb:");
    Note that the trailing ':' character is necessary. When you use
    the Server-side Internal Driver, you always connect to the
    database you are executing in. You can also do this:
    Connection conn
    = new oracle.jdbc.driver.OracleDriver().defaultConnection();
    Hope this helps,
    Thanks,
    Anupama wrote:
    I am using oracle as database and weblogic 4.5. I have copied the classes12.zip file in lib directory of weblogic. I am getting the error that oracle.sql.* and oracle.jdbc.driver.* not found when i am importing these packages in a jsp file. what i need to do to import oracle driver packages?I put it in the classpath also.
    Please Advice!
    Thanks in advance
    AnuPama--
    Apurb Kumar

Maybe you are looking for

  • IPod needing to restore, but I don't have all my music in iTunes!

    So naturally after seeing some bands in concert I went to buy the songs in iTunes. And obviously put them on my iPod. But when I connected my iPod I got a message telling me it can't read my iPod and says I should restore it... But this is a problem

  • SSL on Oracle HTTP causes errors in IE 6/7/8

    Hello, We installed new SSL certificate on Oracle HTTP server (Centos, Linux, Oracle 10g) and getting an error in IE 6,7,8: res://ieframe.dll/dnserror.htm#https://... Examining http headers provide following error description: ERROR_INTERNET_SECURITY

  • Execute a function c in pl-sql

    hi, i would like execute a c function in pl-sql int iCalculate ( int op1, int op2 ) return op1+op2; i would like compile a the function with gcc and creat .o file and after use this file in pl-sql. it's possible? The performance of this system?

  • Have CS3 and CS4, removed CS3, now no ID files will open

    I had both InDesign CS3 and CS4 installed.  By default when I would open an ID file, it would always open in CS4.  I forgot CS3 was on there so I uninstalled it and restarted the computer.  Now nothing starts in Indesign at all unless i actually open

  • HELP! adobe reader XI (11.0.09)  hangs on installation (running scripts package)

    adobe reader XI (11.0.09) hangs on installation (running scripts package). I cannot shut my computer down, because the installer won't let it and says "interrupting the install will damage the computer) I just wanted to update from 11.0.07 but it sai