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

Similar Messages

  • 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.

  • Oracle JDBC driver problem for Oracle 8.1.6

    i am a newbee to Java, i was trying JDBC programming thru Jbuilder 4.0. now the problem is whenever i am trying the DriverManager.getconnection(), I am getting an error "NO SUITABLE DRIVER". i have downloaded jodbc14.jar(oracle 9i JDBC driver) but so result. what can i do now? any other config issues or is it due to absence of a Oracle JDBC driver of Oracle 8.1.6.

    i have set the classpath as mentioned. but no solution.
    the error is like this::
    java.lang.NoClassDefFoundError: java/sql/Savepoint
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:521)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325)
         at java.sql.DriverManager.getConnection(DriverManager.java:517)
         at java.sql.DriverManager.getConnection(DriverManager.java:177)
         at DbaseTest.DbaseForm.OpenConnection(DbaseForm.java:37)
         at DbaseTest.DbaseForm.jbInit(DbaseForm.java:73)
         at DbaseTest.DbaseForm.<init>(DbaseForm.java:26)
         at DbaseTest.Application1.<init>(Application1.java:11)
         at DbaseTest.Application1.main(Application1.java:40)
    i have imported
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    import oracle.jdbc.*;
    import java.lang.*;
    the driver is registered by:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

  • Oracle jdbc driver problems in netbeans 5.5

    need help again....i'm experience a problem. the problems are :
    i connect from netbeans 5.5 to oracle database express client 10g using jdbc driver ojdbc14.jar. the connection succeded (all the tables appears and i even can view the data). but when i trying to bind data to a drop down list component (with right click to the dropdown list component and then bind data), the dataprovider of that table appear in red color and there's no field appears in that. i'm so confused? i already add the ojdbc14.jar driver to the following path :
    1. i create a new class library in netbeans with consist of that driver,
    then added to my project (right click in my project then add library).
    2. then i added the ojdbc14.jar driver to my tomcats lib at "C:\Program
    Files\netbeans-5.5\enterprise3\apache-tomcat-5.5.17\common\lib".
    Is there any additional settings in using oracle jdbc driver? Does anyone knows? thanks a lot for the answers...
    Message was edited by:
    darma_sadha

    Hi!
    I'm using NetBeans 6.5 and I'm having some troubles to connect.
    The steps I've made:
    - Create the connection pool in Glassfish, nothing special, just standard parameters (Based on javax.sql.DataSource and including URL, Username and Password).
    - Create the JDBC resource associated with that connection pool,let's say jdbc/test.
    Now in NetBeans I register the driver:
    - New driver -> Find the ojdbc14.jar and from the options that I can choose it shows: oracle.jdbc.OracleDriver and oracle.jdbc.driver.OracleDriver.
    If i choose without +.driver+ I got the thin drivers (the ones i want) and if i chosse the one with the other one I got the OCI drivers. So I choose the first option oracle.jdbc.OracleDriver
    - Then I go to my project and click New -> Entity Classes from Database and from Datasource I select jdbc/test and it shows the following error message:
    Unable to find the driver oracle.jdbc.driver.OracleDriver. Please register this driver in the Databases.
    I can fix it if while registering the ojdbc14.jar I select the second option (*oracle.jdbc.driver.OracleDriver*) but with this option I need to specity the connection to use OCI instead of the desired thin driver.
    I hope you'll understand and help me somehow
    Edited by: KILE on Oct 10, 2008 2:26 AM

  • Oracle JDBC Driver Problem

    Hi,
    When I write code as
    Resultset rs = .....
    rs.last();
    there is no problem for MySQL JDBC Driver, but when I use this code for Oracle, I am getting error with line 2. Why ? Do you know any Oracle JDBC Driver that supports "rs.last()" ? Or is there another way to handle it?
    Thanks.

    Most of the JDBC Drivers can handle "rs.last()".
    The question here is, how do you create a Scrollable ResultSet using DatabaseMetaData, or if this is even possible.
    A thorough read of the API docs, for the Classes and methods being used here will answer this question (now that you know what the actual question is).

  • Oracle JDBC driver problem for Canada locale

    Hi, there:
    I have problem on Oracle JDBC thin driver with Canada locale on client side:
    I'm using Oracle9i thin jdbc driver, the nls parameters in oracle database is:
    NLS_LANGUAGE: AMERICAN
    NLS_TERRITORY: AMERICA
    NLS_NUMERIC_CHARACTERS : .,
    My java client side is running on Windows NT, which using jdbc thin driver to connect oracle database. If I set the locale in client side as "English(Canada)", it seems return me "French" number format, like ",45" (comma, instead of decimal point) for "0.45". However, If I set client side locale as "English(United States)", it returns me "0.45" as expected.
    So, my question: does Oracle JDBC driver always returns "French" number format evenif I set "English(Canada)" as locale? Because Canada have both English and French locale "French(Canada), and English(Canada)". How can I get "English" number format like "0.45" with "English(Canada)" locale setting?
    Really appreciated any reply, and thanks a lot in advance
    David

    Sounds like a question for Oracle Support to me.
    Anyway, the way to avoid the problem is to not ask Oracle to format numbers. Get the number directly (via ResultSet.getInt() or getDouble() or whatever) and ask Java to format it.

  • 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

  • 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

  • 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

  • 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..

  • Oracle 8.1.5 JDBC driver problem with LONGVARCHAR

    Hi, I'm having problem with 8.1.5 release on Solaris with the
    JDBC type 4 driver (thin). If I create the following table
    create table test1 (col1 NUMBER, col2 LONG);
    Using JDBC driver to insert into the second column any string
    longer than 4000 characters causing run time exception. The type2
    driver works fine, but type2 is slow.
    String sql = "insert into test1 (col1, col2) values (1099,?)";
    PreparedStatement stmt ;
    stmt = conn.prepareStatement(sql);
    // create a string with very long value , bigger than 4096
    stmt.setString(1,string);
    stmt.executeUpdate();
    runtime exception:
    java.sql.SQLException: Data size bigger than max size for this
    type
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(Compiled Code)
    at oracle.jdbc.dbaccess.DBError.check_error(Compiled
    Code)
    at oracle.jdbc.ttc7.TTCItem.setArrayData(Compiled Code)
    at
    oracle.jdbc.driver.OraclePreparedStatement.setItem(Compiled Code)
    at
    oracle.jdbc.driver.OraclePreparedStatement.setString(Compiled
    Code)
    at testi.main(Compiled Code)
    Any help is appreciated.
    Thanks
    Steve
    null

    Post the full stacktrace here
    Also you might want to post jdbc related questions to weblogic.developer.
    interest.jdbc
    Kumar
    DreamNEON wrote:
    Hello,
    the NSAPI integration works, also the JSP files.
    But I have still problems with the Jdriver for my Oracle 8.1.5.
    I get the message :
    Failed to invoke startup class
    weblogic.jdbc.common.internal.JdbcStartup=weblogic.jdbc.common.internal.JdbcStartup
    when the WebLogic Server is started.
    Any ideas or hints about that?
    Thanks in advance
    Armin

  • Problem with Oracle jdbc driver and jdk1.4

    Hi
    I have some java code which uses Oracle jdbc driver.
    This code works with java 1.1.8, 1.2 & 1.3 but not with java 1.4 !
    I have that exception :
    java.sql.SQLException: The Network Adapter could not establish the connection
    at oracle/jdbc/dbaccess/DBError.check_error(DBError.java)
    at oracle/jdbc/driver/OracleConnection.<init>(OracleConnection.java)
    at oracle/jdbc/driver/OracleDriver.getConnectionInstance(OracleDriver.java)
    at oracle/jdbc/driver/OracleDriver.connect(OracleDriver.java)
    at java/sql/DriverManager.getConnection(DriverManager.java:529)
    at java/sql/DriverManager.getConnection(DriverManager.java:179)
    at SimpleQuery.<init>(SimpleQuery.java:21)
    at SimpleQuery.main(SimpleQuery.java:56)
    when I try a getConnection...
    I've tried all the jdbc drivers provided by Oracle, but it's still the same problem !
    Any Idea ?
    Thanks

    Have you tried the drivers shipped with Oracle9i Db R2? they should work against JDK 1.4
    Kuassi
    Hi
    I have some java code which uses Oracle jdbc driver.
    This code works with java 1.1.8, 1.2 & 1.3 but not with java 1.4 !
    I have that exception :
    java.sql.SQLException: The Network Adapter could not establish the connection
    at oracle/jdbc/dbaccess/DBError.check_error(DBError.java)
    at oracle/jdbc/driver/OracleConnection.<init>(OracleConnection.java)
    at oracle/jdbc/driver/OracleDriver.getConnectionInstance(OracleDriver.java)
    at oracle/jdbc/driver/OracleDriver.connect(OracleDriver.java)
    at java/sql/DriverManager.getConnection(DriverManager.java:529)
    at java/sql/DriverManager.getConnection(DriverManager.java:179)
    at SimpleQuery.<init>(SimpleQuery.java:21)
    at SimpleQuery.main(SimpleQuery.java:56)
    when I try a getConnection...
    I've tried all the jdbc drivers provided by Oracle, but it's still the same problem !
    Any Idea ?
    Thanks

  • Problems with Oracle jdbc Driver

    Hi... I'm trying to connect to my Oracle Database and I get the folowing error:
    "package oracle.jdbc.driver does not exist"
    I have installed Oracle 9.1.0.2 Database...
    The value of the Classpath variable is:
    ".;c:\oracle\ora92\jdbc\lib"
    What could be the problem???...
    Thanks in advance.-
    Alberto.-

    Are you building your application from the command line? Or using a GUI? GUI's will frequently overwrite your CLASSPATH environment variable...
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Oracle 8.1.5 - jdbc driver problem

    I am using Oracle8.1.5 (personal oracle) for database. I am trying to retrieve the data from JAVA(JDK 1.3). I use the following driver and its manager in the Java program:-
    DriverManager.registerDriver(new Oracle.jdbc.driver.OracleDriver());
    Class.forName("Oracle.jdbc.driver.OracleDriver");
    However Java is not getting compiled with the following error message:-
    Cannot resolve symbol:
    package: driver
    class: DriverManager
    I would request your goodselves to help me out. Thank you in anticipation.
    Regards,
    Sivaswamy

    Thanks for the reply.
    Have you tried manually taking the current time and
    converting it to the way Oracle is expecting it? If I embed a TO_DATE and format it, it works fine, but I want to stay database independent. Is that want you mean?
    Or how about using new java.util.Date() to get the
    current date?Not sure I follow you:
    --- insertStmt.setTimestamp(5, new java.sql.Date(System.currentTimeMillis()));
    Gives an error since setTimestamp expects a java.sql.Timestamp and
    --- insertStmt.setDate(5, new java.sql.Date(System.currentTimeMillis()));
    Only stores the date without the time.
    Thanks again,
    Todd

  • Problems when using absolute() on Oracle JDBC driver

    Hi all,
    I wrote some codes using JDBC to access a remote Oracle server. After got the resultset, I attempted to use absolute() method to move to a specific row index and got an error. Could anyone please help me to find out the cause and the solution?
    Thanks in advanced,
    ** We have used driver package jdbc/lib/classes.zip in ORACLE 8.1.7
    ** The total of records in HEFKE000 table > 1000;
    ** The coding is following:
    String url = null;
    Connection conn = null;
    ResultSet rs = null;
    Statement stmt = null;
    String query = "select * from HEFKE000";
    String dbName = "HE_MI";
    String hostName = "NTTD";
    String userName = "HOKEN";
    String passWord = "manager";
    String dbDriver = "oracle.jdbc.driver.OracleDriver";
    //Load the Driver
    Class.forName(dbDriver);
    //get connection
    url = "jdbc:oracle:oci8:@NTTD";     
    //url = "jdbc:oracle:thin:@" + hostName + ":1521:" + dbName;
    conn = DriverManager.getConnection (url, userName, passWord);
    // It's faster when you don't commit automatically
    conn.setAutoCommit (false);
    // Create a Statement object so we can submit
    // SQL statements to the driver
    stmt = conn.createStatement();
    // Submit a query, creating a ResultSet object
    rs = stmt.executeQuery(query);
    // Get the ResultSetMetaData. This will be used for the column headings
    ResultSetMetaData rsmd = rs.getMetaData ();
    // Get the number of columns in the result set
    int numCols = rsmd.getColumnCount ();
    int i;
    if (rs.next() == rs.isFirst()) {
    rs.absolute(100);
    boolean more = rs.next ();
    while (more) {
    // Loop through each column, getting the
    // column data and displaying
    for (i=1; i<=numCols; i++) {
    if (i > 1) {
    System.out.print("|");
    if (rs.getString(i) == null)
    System.out.print("");
    else
         System.out.print(rs.getString(i));
    output.println();
    // Fetch the next result set row
    more = rs.next ();
    ** The error:
    Exception in thread "main" java.sql.SQLException: Invalid operation for forward
    only resultset : absolute

    Thanks. However, after changed the codes as your suggestion and ran again, I got the following error:
    Exception:
    java.lang.OutOfMemoryError
    <<no stack trace available>>
    A note is that, the 'select * from HEFKE000' statement would get around 1,5 millions of records. So, the 'out of memory' above is for client side or for server side?
    Thanks,

Maybe you are looking for

  • SD card not shown in Finder, but shown in iPhoto

    Hej all, I have a problem with my SD card. It was shown by Finder on my iMac and it was shown in iPhoto too. Since a while no SD card is shown in Finder, but each SD card is still recognised in the Finder. I have a guess: I think, that I unconciously

  • Quality Drop In Premier Pro 2.0 Ouput

    I work with large projects. I invariable capture 3 or 4 video sources (from Mini DV) and end up synching them and using Multi-Cam. Which means I drag the first sequence which is where I synch the cameras, into a new sequence where I do the camera swi

  • STPO's  -- load date , goods issue, transport is not appear

    Hi Guru's I'm received one case, while creating the STPO's (Different company codes) in items details -> Del.sch-> transport, load date and goods issue is not appear. The Delivery date is 25.02.2008.  next day the user as change the del.date from 25t

  • Moving iPhoto from old Mac to new Mac

    I got a new iMac and have been trying to move my iPhoto library from my old one to the new one. I followed instructions I found here in these discussions, but I'm still having trouble. Here's what I've done: I copied the library from my old computer

  • How do I import an unfinalized iMovie from iDVD back to iMovie so that I can finalize it?

    Some more details: I created a few iMovie's and a few of them I never finalized, I just burned to iDVD.  I had to make space off of my computer so I deleted them, but I made backup copies on DVD for myself.  How can I re-import the DVD so that I can