Oracle Drivers

I'm kinda desperate here, and I think you guys can help. Here is some information first.
Currently using Oracle database, 8i
Using JSP coding
On Apache Tomcat.
OK. I can't connect the JSP to the Oracle database. Obviously I need something like a driver and a connection string.
Recommended ones so far are oracle.jdbc.driver.OracleDriver (driver) and jdbc:oracle:oci8:@ for connection string.
Seriously, I have no idea what these are about.
1) Are there any Oracle drivers I need to further install, or have they been installed already? I always get the javax.servlet.ServletException: No suitable driver error. Is it because I don't have the above driver installed?
2) What other drivers/connection string do you recommend that are less of a hassle to use?
3) jdbc:oracle:oci8:@ <--- what is this ??? I've tried searching up but i can't find it. Does it vary from computer to computer?
4) Are there any drivers that can be supported on Linux? Or are they the same? :(
5) once i get the drivers in hand, what's the code to connect to it?
So far I have this
<%@ page import = "java.sql.*" %>
<%
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection("jdbc:oracle:oci8:@" ,"abc", "def");
Statement stmt = conn.createStatement ();
%>
Got no idea how to work it to fit any new recommendations you might have... :(
Please help me I have a deadline in two weeks and everything has been coded fine, except for the database connectivity, which, of all things, is the most important!
Kindly respond, you experts out there!

Hi there...
oracle.jdbc.driver.OracleDriver - this is just a java class. You should be able to find it in classes12.zip. Also you sould add that classes12.zip to the classapth of your webserver. And try to use jdbc:oracle:thin:@db_ip:db_port:db_sid.
Hope this helps.

Similar Messages

  • Oracle drivers not found by servlets after upgrade of JDK

    I am using jakarta-tomcat 4.0.1 with WIN2K.
    After a recent upgrade to jdk 1.4.0_02 from jdk1.3.1, servlets that try to use oracle crash with this error:
    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
         at ProductLookup.loadJDBCDriver(ProductLookup.java:23)
    the code at line 23 is:
    DriverManager.registerDriver ( new oracle.jdbc.driver.OracleDriver());
    This all worked prior to the upgrade of jdk.
    The code at line 23 does work using the command line.
    I did check the ENVIRONMENT VARIABLES - in my limitted knowledge they look OK. But I am sure there MUST be something missing &/or incorrect.
    During execution, the servlet is just not finding "something".
    I am relatively new to JAVA and especially new to servlets.
    What should I look for to solve this problem?
    TIA
    WalkGood

    The oracle drivers are in a file called classes12.zip.
    Make sure that you unzip these files to where the
    servlets can find them.
    %TOMCAT_HOME%\common\classes
    or
    %TOMCAT_HOME%\classes
    or
    %TOMCAT_HOME\webapps\{app name}\WEB-INF\classesIs %TOMCAT_HOME% an environment variable? I have one called CATALINA_HOME. It is set the jakarta folder "C:\jakarta-tomcat-4.0.1"
    Something I noticed: If I execute tomcat "startup.bat" in a command prompt window, I see echo'd messages. One says "Using CLASSPATH: C:\jakarta-tomcat-4.0.1\bin\bootstarp.jar;C:\jakarta-tomcat-4.0.1\lib\tools.jar" but this NOT match the Environment Variable "classpath" which does specify the path to the classes12.zip folder. Should the "catalina.bat" file assemble the classpath to include the same Environment Variable "classpath" in addition to bootstrap.jar and tools.jar?
    Where can I find specific documentation on how to setup the environment for jakarta-tomcat to find the ORACLE drivers during execution of a servlet?
    TIA
    WalkGood

  • Differences in Oracle Drivers

    We're running 5.1 sp11, and we're encountering the ORA-01475 error with the
    Weblogic Oracle Driver.
    The suggestions are to either change to the Oracle Thin driver or to set the
    statement cache to 0.
    It seems to me at this stage that setting the statement cache would be the
    "safest", though it supposedly has some potential performance hit.
    If I were to change to the Thin driver, what kind of issues might I
    encounter? Is the Thin driver faster or slower? Do the different drivers
    have any dramatic compatability issues? We're using CLOBs and BLOBs in our
    application if that has any bearing.
    Thanx!
    Regards,
    Will Hartung
    ([email protected])

    As a further word of warning -- not all classes12.zip are equal. The name classes12.zip
    belongs to at least a half dozen different versions and releases of the Oracle
    thin driver... You shouldn't assume you have the right one. Go to Oracle's website
    and get the right thin driver for your exact database version, as Kenneth recommends...
    "Kenneth A Kauffman" <[email protected]> wrote:
    >
    "Will Hartung" <[email protected]> wrote in message
    news:3e970812$[email protected]..
    We're running 5.1 sp11, and we're encountering the ORA-01475 errorwith
    the
    Weblogic Oracle Driver.
    The suggestions are to either change to the Oracle Thin driver or toset
    the
    statement cache to 0.
    It seems to me at this stage that setting the statement cache wouldbe the
    "safest", though it supposedly has some potential performance hit.
    If I were to change to the Thin driver, what kind of issues might I
    encounter? Is the Thin driver faster or slower? Do the different drivers
    have any dramatic compatability issues? We're using CLOBs and BLOBsin our
    application if that has any bearing.
    Thanx!
    Regards,
    Will Hartung
    ([email protected])
    JDBC drivers vary, especially by version of Oracle. There's even a
    different between 8.1.7.1 and 8.1.7.4. Use the Oracle drivers for the
    version of Oracle that you have for either thin or OCI. Classes12.zip
    should be the library. Add it to your classpath and configure according
    to
    the documentation. You may even notice an increase in performance.
    ken k

  • How to find Oracle drivers are installed in WAS

    Hi
    I am doing Proto type application using webdynpro.I want to create tables in Oracle database,because WAS is installed on Oracle.Now i went to Visual Admin tool and checked the "JDBC Connector" properties.I tried to create the new 'DataSource".While creating DataSource ,it is asking me DriverName,Driver ClassName,Version.I have following questions:
    1.How to find the wheather Oracle drivers are installed or not?if not where to get these drivers?
    2.Once DataSource is created ,how to test wheater it is working fine or not?please help
    Thanks
    Prasad

    Hello Prasad,
    Don't create a new datasource, but create a datasource alias for the existing SAP<sid>DB datasource with your new name.
    <u>(remember to restart the j2ee cluster)</u>
    Then in your application instatiate the datasource and use your create/update/select statements.
    <b><i>Once this is set up test from your java code as follows:</i></b>
    InitialContext ic = new InitialContext(); 
    DataSource mySource = (DataSource)ic.lookup("java:comp/env/jdbc/YourDataSource");
    or.. DataSource mySource = (DataSource)ic.lookup("java:jdbc/YourDataSource"); <b>(can't remember which of the 2 worked)</b>
    if this throws a NamingException, then your alias doesn't work, or perhaps you forgot to restart the cluster.
    After this executes successfully, use the datasource freely.
    Connection con = mySource.getConnection();
    con.executeQuery
    con.executeUpdate
    con.executeStatement
    ect...
    And forget about oracle, sapdb, informix, db2, or whatever drivers. This makes your application portable and independent from the DB layer.
    Please feel free to reward points if this solves your problem.
    Best regards,
    Homer Vargas

  • Specifying Different Oracle Drivers

    I'm having some issues using some Oracle drivers versions in different applications that use different Oracle versions (8 and 9), is there a way to define for one Connection Pool one version and for another a different one but still have XA support?
    Thanks,
    Johann

    johann renck wrote:
    I'm having some issues using some Oracle drivers versions in different applications that use different Oracle versions (8 and 9), is there a way to define for one Connection Pool one version and for another a different one but still have XA support?
    Thanks,
    JohannHi, nope. The whole JVM will only load one version of a given class.
    I would do everything you need to do to use the 10.2.0.3 thin
    driver in all cases.
    Joe

  • Help on how to install ODBC Oracle drivers

    I need to install ODBC drivers for Oracle on a W95 machine.
    I tryed to install ODBC Oracle drivers on my W95 machine but when
    I extracted the zipped file from ora8052 it created a directory
    called win32; then I searched for the 'setup' executable...
    without to find one...
    In the readme file, on 'software required' I read that I need the
    Oracle Net8 client and teh Oracle8 installer to install ODBC.
    Where can I find Oracle Net8 client and teh Oracle8 installer
    without downloading all the try and by version of Oracle??
    null

    Fulvio,
    you have to get hold of a CD containing Oracle Client software;
    you should ask Oracle for it. SQL*Net itself is free for
    owners of the server license, but I do not know how Oracle
    handles users of the free development kits. If you plan to
    use Oracle for software development I strongly recommend to enter
    one of the partner programmes; it's not free, but very good value
    for money.
    Thomas
    Fulvio Drago (guest) wrote:
    : I need to install ODBC drivers for Oracle on a W95 machine.
    : I tryed to install ODBC Oracle drivers on my W95 machine but
    when
    : I extracted the zipped file from ora8052 it created a directory
    : called win32; then I searched for the 'setup' executable...
    : without to find one...
    : In the readme file, on 'software required' I read that I need
    the
    : Oracle Net8 client and teh Oracle8 installer to install ODBC.
    : Where can I find Oracle Net8 client and teh Oracle8 installer
    : without downloading all the try and by version of Oracle??
    null

  • Where to get Old Oracle Drivers (for Mac)?

    Hi, I need to run an old Mac OS 9 application (actually I'm trying with Classic under OS X on a Mac Mini G4)
    This application needs the OCI library OracleOci73Lib.
    I've been searching it in Oracle web downloads section, but i can't find it.
    I've tried installing the newer OCI drivers, but these are for Mac OS X and I suppose Classic doesn't even "see" them.
    Does anyone know where could I get old Oracle drivers?
    thanks!

    Hi Alexlee,
    Welcome to Lenovo Community!
    As per the query we understood that you are looking for driver to your ThinkPad T430.
    Below is the link to enter the downloads page and download latest application accordingly, please click on "Select Product" then in "QUICK PATH" enter the MTM no. select the exact model.
    http://support.lenovo.com/en_US/downloads/default.​page#
    Hope this helps!
    Best regards,
    Hemanth Kumar
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Problems with classpath and oracle drivers

    Hi, i've developed an application that uses oracle drivers "classes12.jar" using Eclipse. While i was writing the code, i manually specified the classpath which contains "classes12.jar" file using Eclipse's own configuration tool and now it works perfect when i run it under Eclipse. I then tried to run it using dos prompt but when i tried to run the program i got "ClassNotFoundException: oracle.jdbc.driver.oracledriver". As you can guess, i thought that was a classpath issue so i set the classpath as follows:
    set CLASSPATH=C:\oracle\ora92\jdbc\lib
    where the directory "C:\oracle\ora92\jdbc\lib" is the one that contains classes12.jar file which i had also specified using Eclipse before.
    After that, i recompiled my application and tried to launch it as follows:
    ->javac Test.java
    ->java Test
    But then i got the following runtime error:
    Exception in thread "main" java.lang.NoClassDefFoundError: Test
    Since this happened after i manually set CLASSPATH variable, this has something to do with that. What should i do now? Thanks in advance.

    Correct - the JAR has to be spelled out in the CLASSPATH.
    I'd also recommend that you not set CLASSPATH using a system environment variable. Better to use the -classpath parameter on javac.exe when you compile and java.exe when you run. Put the command into a script that you invoke when you start up the app. It'll document the fact that it's needed for anyone that comes after you and relieves you from having to change the CLASSPATH on machines you deploy to. And, for good measure, app servers like Tomcat and WebLogic totally ignore the system CLASSPATH. I don't even have one.
    %

  • Using Refcursor in Callable Statement without using the Oracle Drivers

    Hello all,
    Is there anyway to have a stored procedure (Oracle 8i) return a refcursor to my CallableStatement without using the Oracle Thin drivers (i'm now using jdbcodbc). I've tried registering my out parameter with every possible type i can think of...REF, JAVA_OBJECT, OTHER, etc. but with no luck.
    Help!!!!

    Certainly...I connect to the database using the
    jdbcodbc driver and when i execute any of the code, i
    get the following error:
    java.sql.SQLException: [Oracle][ODBC][Ora]ORA-06550:
    line 1, column 7:
    PLS-00306: wrong number or types of arguments in call
    to 'PVISUAL_GET'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    It's bombing on the line that i attempt to register
    OracleTypes.CURSOR. It works fine when i use the
    oracle thin drivers, but i want to get this puppy
    working with the JdbcOdbcDriver. Here's the code:
    CallableStatement dbCall =
    nt dbCall =
    (CallableStatement)connection.prepareCall("{ call
    PAK_VISUAL_GET.pvisual_get(?, ?, ?, ?, ?, ?) }");
    dbCall.setString(1, sessionKey);
    dbCall.setInt(2,
    l.setInt(2, Integer.parseInt(storedVizID));
    dbCall.registerOutParameter(3,
    arameter(3, OracleTypes.CURSOR);
    dbCall.registerOutParameter(4,
    arameter(4, OracleTypes.NUMBER);
    dbCall.registerOutParameter(5,
    arameter(5, OracleTypes.VARCHAR);
    dbCall.registerOutParameter(6,
    arameter(6, OracleTypes.NUMBER);
    dbCall.execute();when you don't use oracle thin driver, you cannot use the OracleTypes. but, instead use the java.sql.Types values.Replace dbCall.registerOutParameter(3, OracleTypes.CURSOR); with
    dbCall.registerOutParameter(3,java.sql.Types.OTHER). things should be fine.
    Ganesh

  • Oracle Drivers Problem

    I am facing unique problem. I am connecting to Oracle using Oracle Inproc server 3.0 type library(Set Session = CreateObject("OracleInProcServer.XOraSession")).
    After establising the connection when we execute the a stored procedure using the datbase object
    Set SQLStmt = Database.CreateSql(SQL, &H0)
    Now when we try and insert nine digit decimal number e.g 1011111.87 instead of updating it with above no it updates it to 1011111.88 or 1011111.77 or any other random last 2 chars
    Now here the SQL is of the type string which fires a stored procedure
    Table details
    CREATE TABLE XXX_TEST (
    PAYMENTID NUMBER (9),
    PAYMENTAMOUNT NUMBER (10,2))
    TABLESPACE DATA NOLOGGING
    PCTFREE 10
    PCTUSED 40
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1048576
    NEXT 1048576
    MINEXTENTS 1
    MAXEXTENTS 1024
    FREELISTS 1 FREELIST GROUPS 1 )
    NOCACHE;
    Stored Procedure details
    PROCEDURE prc_XXX_temp
    payment_id_i IN NUMBER(6),
    payment_amount_i IN NUMBER(10,2),
              payment_amount_o out NUMBER(10,2)
    IS
    BEGIN
    Insert into XXX_TEST
              (paymentid ,
                   paymentamount )
                        values
                        (payment_id_i,
                        payment_amount_i);
                        payment_amount_o:=payment_amount_i;
                        return;
    COMMIT;
    END prc_XXX_temp;

    I am glad I found this post!
    I am using Sun Java 1.1.8 to build a signed applet.
    My database is upgrading to 9.2.0.5
    I get this exception when I try "DriverManager.getConnection";
    java.lang.NullPointerException
    at oracle.jdbc.ttc7.O3log.marshal(Compiled Code)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(Compiled Code)
    at oracle.jdbc.driver.OracleConnection.<init>(Compiled Code)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(Compiled Code)
    at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
    at java.sql.DriverManager.getConnection(Compiled Code)
    * at java.sql.DriverManager.getConnection(Compiled Code)
    at TestApplet.paint(Compiled Code)
    at java.awt.Component.dispatchEventImpl(Compiled Code)
    at java.awt.Container.dispatchEventImpl(Compiled Code)
    at java.awt.Component.dispatchEvent(Compiled Code)
    at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
    at java.awt.EventDispatchThread.run(Compiled Code)
    at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
    I had no problem connecting to the db as an application, but the applet did not work. I "downgraded" the JDBC driver to 9.0.1 and it works fine now. I second Dennis' plea to Oracle. The 9.2 jdbc drivers are broken!

  • Can I have multiple Oracle drivers installed?

    I have a Windows 2000 machine that has Oracle 7.3 drivers installed for one application and now I have another app going on that has 8.01.07.00 of the Oracle driver. I have been having problems getting the new driver installed and then both apps running. If I can get them both installed, will I need to combine the tnsnames.ora files into one or can I have both?
    Thanks.

    I'm assuming that you have two different ORACLE_HOME's (i.e. both Oracle7 & Oracle8 client software has been installed into different directories). If this is the case, I believe this should work, though I don't believe it's officially supported.
    8i added official support for multiple Oracle homes-- the latest ODBC drivers support multiple homes, although the ODBC drivers didn't add this support right with 8i. You may try grabbing the latest 8.1.7 driver, just to make sure that you've got a multi-home capable driver.
    Justin

  • Push Install Oracle Drivers?

    I need a way of installing Oracle ODBC drivers and/or native drivers on a mix of Windows 95, 98, NT and Windows 2000 workstations. Many of the machines are older machines with small hard drives so I need a minimum install with minimum user intervention.
    The databases being accessed are 8.1.6 version on NT servers. The end users usually want to link to our databases using Microsoft Access.
    I don't want the end user to have to seperately load the Oracle Universal Installer or make any decisions on where to install it. Just an executable they can run or something we can push with Microsoft SMS.
    Any suggestions? Please reply directly to my email address, [email protected], as well as to the forum. Thanks!

    Hi Avi Miller
    Thank you for your Help .. I success to configure dm-multipath.. now i can see the mapped device as
    # ll /dev/mapper
    crw------- 1 root root 10, 61 Feb 9 20:59 control
    brw-rw---- 1 root disk 253, 0 Feb 9 21:00 ovs
    ovs is an alias for /dev/sdc which is the active path of the storage Lun , but the passive path /dev/sdb is still existing and it giving error at the boot of OVM Server
    end_request: I/O error, dev sdb, sector 0
    Buffer I/O error on device sdb, logical block 0
    end_request: I/O error, dev sdb, sector 0
    Buffer I/O error on device sdb, logical block 0
    end_request: I/O error, dev sdb, sector 0
    Buffer I/O error on device sdb, logical block 0
    end_request: I/O error, dev sdb, sector 0
    Buffer I/O error on device sdb, logical block 0
    why the system is still looking for the passive path /dev/sdb even after multipath was configured ????
    did you have such problem
    Thank you

  • MySQl /Oracle drivers

    I need information on where to get the drivers for:
    'MySQL and Oracle 9i
    and how to install them and use them with Jdeveloper.
    newbie

    Both "Oracle 9.2.0.1's driver for JDK 1.4" and "MySQL
    3.23.55's Connector/J 3.0.6" have problem working with
    my JDK 1.4.1_01! Why? My OS is WinXP SP1.There are several possibilities.
    1. There is something wrong with your code and/or environment. Depending on your programming experience level there is a 90% to 99.999% chance that this is the problem.
    2. The same person/company wrote both drivers and so it has similar bugs. I would expect that this is close to zero percent on the possibility scale.
    3. Different people/companies wrote both drivers and it is just coincidence that the same bugs show up. Again almost zero percent chance.

  • Packaging an Application that uses Oracle Drivers

    I need to package an application into an executable file, or at least an executable jar file. I am using JBuilder for development. Of course everything works correctly with finding drivers and connecting to the database using JBuilder. I used JBuilder's Archive Wizard to create a jar, then turn it into an executable jar. It also makes executables (ie. .exe files) for me.
    However, I have tried several combinations and it just can't find the drivers. It always throws a ClassNotFoundException. I have tried including the drivers files and as resources when making the jar. I have even tried putting them directly in when using command line:
    set classpath = c:\ojdbc14.jar
    java -classpath c:\ojdbc14.jar -jar myApp.jarand it still says it cannot find the drivers.
    Any advice would be greatly appreciated!
    Thanks!
    Amber

    Hello Amber;
    I am trying to connect to oracle through java. The java application is build with JBuilder and the oracle driver, i.e. classes12.jar and ojdbc14.jar, are added in the CLASSPATH.
    When I create a class without JBuilder as stand alone class, it works fine. But when I use the same code in the my JBuilder application, it does not load the driver, gives ClassNotFound exception.
    Please specify, is there a special way to access databse from jbuilder. Do I have to include drivers in Jbuilder, if yes, then how? or it is due to some other problem
    Your help will be greatly appreciated.
    Regards
    Ali Hammad

  • Cannot connect on oracle drivers, but can with datadirect... Why is it?

    First, I used 10.2 drivers and got the same error as someone in this forum:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-12705: Cannot access NLS data files or invalid environment specified
    Of course, ojdbc14.jar, orai18n.jar and ons.jar were in classpath. Then I found in mentioned thread, that 10.1 drivers don't have this trouble. I've downloaded them (funny, but ons.jar was absent) - the program started swaring about absense of ons.jar. Then I added it from 10.2, and got the following:
    oracle.ons.ONSException: oracle.ons.oraclehome not set
         at oracle.ons.ONS.<init>(ONS.java:160)
         at oracle.ons.ONS.getONS(ONS.java:624)
         at oracle.ons.Subscriber.<init>(Subscriber.java:54)
    So, the question is: what the hell does this mean? I tried DataDirect drivers, and everything worked fine, but I wanted to use standard ones...
    And yes, the DB I use is Oracle Express Beta 2. Maybe, the answer is 42... sorry, "beta 2"?
    :))

    Well, I've solved the problem with 10.1 drivers (the reason was that I called before connection the following method - setFastConnectionFailoverEnabled(true);
    I thought it stated for fast reconnection on network failures). But the problem with 10.2 drivers persists. Of course, I can (and will) use 10.1, but the question is - whether the problem mentioned (ORA-00604,ORA-12705) is common for all those who use non-western locales?

Maybe you are looking for