Oracle Type4 driver (ojdbc14.jar) connection proble

Hi,
I'm trying to connect to my oracle 8i installed in my local machine through type4 driver.
I've downloaded ojdbc14.jar and included its path to classpath
The following lines are included in my code
Class.forName("oracle.jdbc.OracleDriver");
cn = DriverManager.getConnection("jdbc:oracle:thin:scott/tiger@localhost:1521:dbmsConnect ")
I've created the DSN as follows (in Windows XP)
Control Panel - Administrative Tools - Data Sources - Add - Took Oracle ODBC Driver - entered DSN name as dbmsConnect -added user id as scott
When I ran the code, Igot following exception
Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135286784)(ERR=12505)
(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
Could anyone help me please

You may need a later version of the driver:
http://www.dbforums.com/showthread.php?t=971271
Pl. also see:
http://forum.java.sun.com/thread.jspa?threadID=563288&messageID=2773243
http://forum.java.sun.com/thread.jspa?threadID=300137&messageID=1189780

Similar Messages

  • Ojdbc14.jar connect to 10g so slow with JRE1.5.0_05

    Our guests complained the speed is so slow that they can not stand up with this...
    So I run the tests base on JRE1.5.0_05 and ojdbc14.jar and Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    try {
                        Class.forName("oracle.jdbc.driver.OracleDriver");
                        String url = "jdbc:oracle:thin:@//host:1521/orcl";
                        Date now = new Date();
                        Connection conn = DriverManager.getConnection(url, "user",
                                  "password");
                        System.out.println(System.currentTimeMillis() - now.getTime());
                        conn.setAutoCommit(false);
                        Statement stmt = conn.createStatement();
                        ResultSet rset = stmt
                                  .executeQuery("select BANNER from SYS.V_$VERSION");
                        while (rset.next()) {
                             System.out.println(rset.getString(1));
                        stmt.close();
                        System.out.println("Ok.");
                   } catch (Exception ex) {
                        ex.printStackTrace();
    The output is :
    4875
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Ok.
    the statement Connection conn = DriverManager.getConnection(url, "user", "password") execution time is 4875 milliseconds!!!!!
    so i switched to 9i the output is:
    0
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    PL/SQL Release 9.2.0.1.0 - Production
    CORE     9.2.0.1.0     Production
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    NLSRTL Version 9.2.0.1.0 - Production
    Ok.
    I change the JDK version to 1.4 or 1.6 the execution time is also 0.
    I walk through the internet and finally found the solution:
    ProxySelector.setDefault(null);
    But i am still confused when it come to the same environment the same code to connect to the 9i,10g, the getConnection() method execution time is so different without the statement ProxySelector.setDefault(null). so I suspect that this is an issue to 10g not the JDK1.5.x.
    Edited by: user12084131 on 2010-9-20 上午1:46
    Edited by: user12084131 on 2010-9-20 上午1:47

    Thanks for the reply,
    One correction to the above <Corrected now in my original post>
    Its connecting to " com.bea:ServerRuntime=managed03,Name=managed03,Type=JRockitRuntime"
    Tried with previous version again, it works perfect. But i still have issue with new JRE version.
    Regards,
    Rana
    Edited by: user13387204 on 02-Oct-2010 19:01

  • Hibernet query returns null for XMLTYPE data when I use oracle type4 driver

    Hi,
    I am using Oracle type-4 driver, My hibernet query returns null for data type XMLTYPE. But when I use BEA type -4 driver its working fine. Please help me to retrive XMLTYPE data using oracle-4 driver through hibernet query.
    Thanks in advance.
    regards,
    Amaresh

    Hi,
    I am using Oracle type-4 driver, My hibernet query returns null for data type XMLTYPE. But when I use BEA type -4 driver its working fine. Please help me to retrive XMLTYPE data using oracle-4 driver through hibernet query.
    Thanks in advance.
    regards,
    Amaresh

  • Sql server 2000 type4 driver for jdbc connection error

    hello,
    I am trying to connect m ms sql server 2000 database server with type 4 driver.But I am getting an connection error like *"Error Establishing Socket"* .Can any one please help me out?

    Well i personally prefer usage of open source MS SQL SERVER 2k jdbc driver called jtds instead of the driver provided by MS themselves(which is proproteriry) as i had similar problem which i personally encountered when i was using it.
    go through the below link for further info.
    http://jtds.sourceforge.net/
    REGARDS,
    RaHuL

  • How dependency ojdbc14.jar in my project

    How install Oracle Jdbc driver(ojdbc14.jar) in your Maven repository ??????
    Help me !!!! Thank !!!

    I actually don't know how to do this, but this was the first hit on google:
    http://www.springfuse.com/documentation/install-oracle-jdbc-driver-in-maven-repository.action

  • How do I install the "ojdbc14.jar" driver?

    Hi...
    I want to start with JDBC APIs. I have downloaded the Oracle driver "ojdbc14.jar". I don't know where to keep this driver and what all settings need to be done.
    Can any one help?
    Thanks...

    Are you by any chance new to Java?
    If not, then where you put the jar depends on the type of application you are building.
    For example, I build a lot of web applications which are deployed as WAR files to an app server. In this case, I usually put the ojdbc.jar in the WEB-INF/lib. You can also put the jar in common/lib of the app server so that all apps have access to it.
    Use of the system environment variable CLASSPATH is not used so much anymore with recent JDKs.
    If you are new to Java then I recommend choosing a decent IDE (Eclipse/NetBeans/JDeveloper are the main free ones) and going through the Java tutorial. It has a section on using JDBC.
    Hope that helps,
    Rakesh

  • Oracle jdbc driver class and classes12.jar whether deprecated.?

    Hi All,
    1. In one of the post, it has been told that oracle.jdbc.driver.OracleDriver will be deprecated and also recommended to used oracle.jdbc.OracleDriver.
    According to that post, I changed the driver class name in my code as below:
    Class.forName("oracle.jdbc.OracleDriver");
    Then to check the driver name, I insert the below code:
    Enumeration<Driver> driverEnum = DriverManager.getDrivers();
    +while (driverEnum.hasMoreElements()){+
    System.out.println("driver : "driverEnum.nextElement());+
    +}+
    Below is the output:
    driver : oracle.jdbc.driver.OracleDriver@addbf1
    Even after specifying the driver class name to be used as oracle.jdbc.OracleDriver, why it is taking oracle.jdbc.driver.OracleDriver..?
    INFO : The Oracle JDBC Driver (classes12.jar) version is 10.2.0.4.0.
    2. We are using classes12.jar for developing all JDBC code. In Oracle Database 11g Release 2 (11.2.0.2.0) JDBC Drivers, there is no classes12.jar. Is this deprecated? Which jar can be used instead of classes12.jar?
    Thanks in advance.

    In Oracle Database 11g Release 2 (11.2.0.2.0) JDBC Drivers, there is no classes12.jar. Is this deprecated? Which jar can be used instead of classes12.jar?For JDBC 4.0 features ojdbc6.jar with JDK 6.0.
    For JDBC 3.0 support ojdbc 5.jar with JDK 5.0
    http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html

  • 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

  • How to avoid oracle.jdbc.driver.OracleConnection using

    i'am new in Java but recently i've got a project on support.
    Problem:
    solution worked on jvm 1.4, now on 1.7.
    Respectively, class oracle.jdbc.driver.OracleConnection has been used.
    Now I need class oracle.jdbc.OracleConnection to use CLOB.createTemporary() but...I can't.
    According to the docs, it's enough to replace in code and config files one class declaration on another. But NO. I replaced all of them in all config files and anyway, there was only oracle.jdbc.driver.OracleConnection has been created. (there is no explicit declaration of connection type in code, everything is configured in config files)
    Project uses marven, mybatis-3.1.1. Database: oracle 9
    Driver: ojdbc14-9.2.0.5.jar contains both classes: both oracle.jdbc.driver.OracleConnection (for backward compatibility) and oracle.jdbc.OracleConnection.
    The matter is what should i do to use second one instead of first one.
    May be there is some java cache? I do not know...
    Anybody knows?

    Now I need class oracle.jdbc.OracleConnection to use CLOB.createTemporary() but...I can't.
    Why not? You have to explain, in detail, WHAT you are trying and WHY you say you "can't" do it.
    According to the docs, it's enough to replace in code and config files one class declaration on another.
    That is correct - this IS all that is required. Replace ALL references to 'oracle.jdbc.driver' in your code.
    But NO. I replaced all of them in all config files and anyway, there was only oracle.jdbc.driver.OracleConnection has been created. (there is no explicit declaration of connection type in code, everything is configured in config files)
    We can't SEE what 'config' information you say you changed. It is what is in the CODE that matters, not what is in a config file.
    If the 'oracle.jdbc.driver' package is being imported by your code and a reference to 'Connection' is made Java will use it from the first package that it finds the class in.
    You are using an ANCIENT jdbc jar file. That doc you linked to WARNS you that you should upgrade and that doc is over ten years old.
    Remove that old jdbc jar file and use the current driver. Also remove references to the old package and replace them with references to the new package.
    With code and jars that are that old you can expect to have problems trying to use additional features, especially extensions. I would be surprised if you didn't have other issues as well.
    You need to perform code review to find all of the references that need to be corrected.

  • Problem with Oracle Thin Driver

    I use the Thin Oracle Driver (ojdbc14.jar) in my project and execute the code below.
    import java.sql.*;
    class dbAccess
         public static void main(String args[]) throws SQLException
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              Connection conn =
                   DriverManager.getConnection(
                        "jdbc:oracle:thin:@dbhost:1521:ORA1",
                        "scott",
                        "tiger");
              // @machine:port:SID,   userid,  password
              Statement stmt = conn.createStatement();
              ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
              while (rset.next())
                   System.out.println(rset.getString(1)); // Print col 1
              stmt.close();
    }But then a exception occurs: "java.sql.SQLException: E/A-Exception: The Network Adapter could not establish the connection".
    Whats wrong? Do I need to install Oracle? I didn't. I just use that jar file because I read that I don't need anything else.

    1) I never configured that url, used the class from a example.
    2) I didn't configure username / password.
    3) As I said, Oracle is not installed at all. I only use the jar file.
    I read:
    > I want to create a Java application which runs on many 400 MHz
    laptops. Do I need to install Oracle completely on all these laptops
    to use Oracle database? Or can I install a "light" version, which
    doesn't use much harddisk space, RAM and prozessor time? If yes, how
    much harddisk space, RAM and prozessor time does it cost me?
    Since you're writing a Java application, I'm assuming that you'll be
    using JDBC to connect to the database.  If so, you just need to
    download the JDBC thin driver to the client machines-- no Oracle
    software needs to be installed.What is the solution?

  • Unsupport feature SQL exception ---JDK1.4 and oracle 10g driver

    here there,
    I got the unsupport feature SQLexeption, does anybody have any idea? JDK1.4 and oracle 10g driver should fully support JDBC 3.0. Am I right ?
    Thank you very much
    Avni
    here is my snippet code,
    Connection con = DriverManager.getConnection(url, user, password);
              DatabaseMetaData data = con.getMetaData();
              int jdbcVersion = data.getJDBCMajorVersion();
    and here is the exception,
    java.sql.SQLException: Unsupported feature
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
         at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:690)
         at oracle.jdbc.OracleDatabaseMetaData.getJDBCMajorVersion(OracleDatabaseMetaData.java:4061)
         at com.sbc.jdbc.ConnectionVersion.<init>(ConnectionVersion.java:36)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:80)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:44)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:315)
         at org.eclipse.ve.internal.java.vce.launcher.remotevm.JavaBeansLauncher.main(JavaBeansLauncher.java:93)

    Avni,
    Works for me with Oracle 10g database, "ojdbc14.jar" JDBC driver (latest version -- 10.2.0.1.0 -- downloaded from OTN) and JDK 1.4.2_07:
    conn = ods.getConnection();  // Using 'OracleDataSource'
    DatabaseMetaData dbmd = conn.getMetaData();
    System.out.println("JDBC Major Version: " + dbmd.getJDBCMajorVersion());Above code prints out:
    JDBC Major Version: 10Good Luck,
    Avi.

  • How to set the oracle oci8 driver?

    hello all:
    I've set up the oracle thin driver and it works. but when I change to
    oci8.it don't work
    below is config and errors:
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    InitialCapacity="5" LoginDelaySeconds="5" MaxCapacity="15"
    Name="ocipool"
    Properties="user=yanji;password=yanji"
    Targets="myserver" URL="jdbc:oracle:oci8:@pg01"/>
    Could not load 'oracle.jdbc.driver.OracleDriver
    If this is a type-4 JDBC driver, it could occur if the JDBC
    driver is not in the system CLASSPATH.
    If this is a type-2 JDBC driver, it may also indicate that
    the Driver native layers(DBMS client lib or driver DLL)
    have not been installed properly on your system
    or in your PATH environment variable.
    This is most likely caused by one of the following:
    1. The native layer SO, SL, or DLL could not be found.
    2. The file permissions on the native layer SO, SL, or DLL
    have not been set properly.
    3. The native layer SO, SL, or DLL exists, but is either
    invalid or corrupted.
    For more information, read the installation documentation
    for your JDBC Driver, available from:
    http://e-docs.bea.com
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection
    ectionEnvFactory.java:208)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource
    ectionEnvFactory.java:131)
    at weblogic.common.internal.ResourceAllocator.makeResources(Resource
    ator.java:698)
    at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocat
    va:282)
    best regards

    Hello, Jenny I am glad you found your resolution. I too am having problems isung
    the oracle 0CI8 driver. My connection pool is creating fine, but my server is
    crashing with JVM errors.
    Here are my configurations.
    DBase=Oracle 8.1.7,OS=Win2000, running 6.1 with Portal 4.0
    pool config =
    <JDBCConnectionPool CapacityIncrement="0"
    DriverName="oracle.jdbc.driver.OracleDriver" InitialCapacity="5"
    MaxCapacity="5" Name="ccConPool"
    Properties="jdbc.url=jdbc:oracle:oci8:@servername:1521:orcl;user=XXXXX;password=XXXXXX;dll=ocijdbc8;server=orcl;protocol=oci8;dll=ocijdbc8;protocol=oci8"
    RefreshMinutes="0" Targets="portalServer"
    TestTableName="WIP_TABLE" URL="jdbc:oracle:oci8:@servername"/>
    My classpath sets my classes12.zip file first. My path sets %WEBLOGIC_HOME%\bin\oci817_8
    and %WLCS_ORACLE_HOME%\bin.
    Am I setting the right dll and protocol in my .dll? Where can I find documentation
    on these properties definitions?
    "jenny" <[email protected]> wrote:
    hello all:
    I've got the answer. those all because weblogic.jar. this jar include
    the
    class "oracle.jdbc.driver.OracleDriver".
    although I put the classes12.zip into the CLASSPATH.but the weblogic.jar
    in
    front of classes12.zip.so classloader
    load the class from weblogic.jar. so I can use thin driver(weblogic
    implements this function with class,but not for oci8 )
    ..this is really a big pitfall !
    put the classes12.zip in front of weblogic.jar .all perfect!
    "jenny" <[email protected]> wrote in message
    news:[email protected]...
    hello all:
    below is some chapters of my config.xml and startWeblogic.cmd
    the oci8 :
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    InitialCapacity="5" LoginDelaySeconds="5" MaxCapacity="15"
    Name="ocipool" Password="{3DES}J3XuQd6cvvw="
    Properties="user=yanji;password=yanji;dll=ocijdbc8;protocol=oci8"
    Targets="myserver" TestTableName="test"
    URL="jdbc:oracle:oci8:@pg01"/>
    the thin :
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    InitialCapacity="5" LoginDelaySeconds="5" MaxCapacity="15"
    Name="citcpool" Password="{3DES}J3XuQd6cvvw="
    Properties="user=yanji;password=yanji"
    SupportsLocalTransaction="true" Targets="myserver"
    URL="jdbc:oracle:thin:@sune250:1521:pg01"/>
    :runWebLogic
    echo on
    set ORACLE_HOME=e:\oracle
    set PATH=./bin;%ORACLE_HOME%\bin;%ORACLE_HOME%\lib;%PATH%
    set
    CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;.\lib\dom.jar;.\lib\xml
    4j.jar;.\lib\jecf.jar;%ORACLE_HOME%\jdbc\lib\classes12.zip
    echo off
    the thin driver is ok,but the oci driver can not work!
    if I've set the wrong CLASSPATH or PATH , the thin driver and oci8driver
    must have not worked. I confused!
    "Sree Bodapati" <[email protected]> wrote in message
    news:[email protected]...
    "Sree Bodapati" <[email protected]> wrote in message
    news:[email protected]...
    Its not CLASS_PATH it should be CLASSPATH.
    when you say oracle\bin and oracle\lib , on what driver is the oracle
    folder?I meant to say 'on what drive' not 'on what driver'
    you have to specify the full path.
    post your startup script here.
    sree
    "jenny" <[email protected]> wrote in message
    news:[email protected]...
    hello all:
    I've set the ORACLE_HOME,and CLASS_PATH,but nothing changed. I will
    go
    to
    crazy!!!
    when startup the weblogic,I've seen the oracle\bin and oracle\libin th
    "path" and classes12.zip in the CLASS_PATH.but the errors stillappears!!
    "Sree Bodapati" <[email protected]> wrote in message
    news:[email protected]...
    1. Dont copy this file oci8jdbc.dll, to bin folder. Make sure
    you
    place
    <oracle_home>\lib in your PATH before starting the server. Make
    sure
    your
    ORACLE_HOME environment varable is set to <oracle_home> folder.
    eg. set ORACLE_HOME=c:\ora816 before starting the server.
    so you must have done something like
    set ORACLE_HOME=c:\ora816
    set PATH=%ORACLE_HOME%\bin;%ORACLE_HOME%\lib;%PATH%
    2. double check if you set your CLASSPATH something like this,
    CLASSPATH=%ORACLE_HOME%\jdbc\lib\classes12.zip;%CLASSPATH%
    in the server startup script just before starting the server.
    3. start the server the connection pool should work.
    hth
    sree
    "jenny" <[email protected]> wrote in message
    news:[email protected]...
    hello All:
    I've edited the StartWeblogic.cmd, set the classes.zip into CLASSPATH,and
    copied the oci8jdbc.dll to the bea\wlserver6.1\bin. errors stillappears!
    my weblogic version is 6.1 and oracle is 8.1.6 .
    why the thin driver is ok but the oci driver can not work?
    I logined in the oracle website and look for the jdbc.but I find
    that
    jdbc
    all provide for jdk1.2 or jdk1.1. because the weblogic6.1 based
    jdk1.3.
    I
    think i can not use those drivers.
    I think my oracle driver is ok,because i installed the jboss and
    bas4.5
    in
    my computer. they all can use oci8 driver properly.and they all
    based
    jdk1.3.
    by the way. I 've tryed added the oracle\bin path inStartWeblogic.cmd,
    nothing changed !
    again below is my config : I want to know whether my config right?
    (the property DLL and Protocal auto added by the weblogic)
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    InitialCapacity="5" LoginDelaySeconds="5" MaxCapacity="15"
    Name="ocipool"
    Properties="user=yanji;password=yanji;dll=ocijdbc8;protocol=oci8"
    Targets="myserver" URL="jdbc:oracle:oci8:@pg01"/>
    best regards
    ----- Original Message -----
    From: "Mitesh Patel" <[email protected]>
    Newsgroups: weblogic.developer.interest.jdbc
    Sent: Thursday, December 13, 2001 4:00 AM
    Subject: Re: how to set the oracle oci8 driver?
    To use oracle oci8 driver:
    You should have classes12.zip in weblogic classpath.
    You should have ocijdbc8.dll in your weblogic path..
    You can download ocijdbc8.dll from oracle website.
    Mitesh Patel
    jenny wrote:
    hello all:
    I've set up the oracle thin driver and it works. but when I
    change
    to
    oci8.it don't work
    below is config and errors:
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    InitialCapacity="5" LoginDelaySeconds="5" MaxCapacity="15"
    Name="ocipool"
    Properties="user=yanji;password=yanji"
    Targets="myserver" URL="jdbc:oracle:oci8:@pg01"/>
    Could not load 'oracle.jdbc.driver.OracleDriver
    If this is a type-4 JDBC driver, it could occur if the JDBC
    driver is not in the system CLASSPATH.
    If this is a type-2 JDBC driver, it may also indicate that
    the Driver native layers(DBMS client lib or driver DLL)
    have not been installed properly on your system
    or in your PATH environment variable.
    This is most likely caused by one of the following:
    1. The native layer SO, SL, or DLL could not be found.
    2. The file permissions on the native layer SO, SL, or DLL
    have not been set properly.
    3. The native layer SO, SL, or DLL exists, but is either
    invalid or corrupted.
    For more information, read the installation documentation
    for your JDBC Driver, available from:
    http://e-docs.bea.com
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection
    ectionEnvFactory.java:208)
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.createResource
    ectionEnvFactory.java:131)
    atweblogic.common.internal.ResourceAllocator.makeResources(Resource
    ator.java:698)
    atweblogic.common.internal.ResourceAllocator.<init>(ResourceAllocat
    va:282)
    best regards
    "jenny" <[email protected]> wrote in message
    news:[email protected]...
    hello all:
    I've set up the oracle thin driver and it works. but when I change
    to
    oci8.it don't work
    below is config and errors:
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    InitialCapacity="5" LoginDelaySeconds="5" MaxCapacity="15"
    Name="ocipool"
    Properties="user=yanji;password=yanji"
    Targets="myserver" URL="jdbc:oracle:oci8:@pg01"/>
    Could not load 'oracle.jdbc.driver.OracleDriver
    If this is a type-4 JDBC driver, it could occur if the JDBC
    driver is not in the system CLASSPATH.
    If this is a type-2 JDBC driver, it may also indicate that
    the Driver native layers(DBMS client lib or driver DLL)
    have not been installed properly on your system
    or in your PATH environment variable.
    This is most likely caused by one of the following:
    1. The native layer SO, SL, or DLL could not be found.
    2. The file permissions on the native layer SO, SL, or DLL
    have not been set properly.
    3. The native layer SO, SL, or DLL exists, but is either
    invalid or corrupted.
    For more information, read the installation documentation
    for your JDBC Driver, available from:
    http://e-docs.bea.com
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection
    ectionEnvFactory.java:208)
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.createResource
    ectionEnvFactory.java:131)
    atweblogic.common.internal.ResourceAllocator.makeResources(Resource
    ator.java:698)
    atweblogic.common.internal.ResourceAllocator.<init>(ResourceAllocat
    va:282)
    best regards

  • Ojdbc14.jar not integrated in JDev 9.0.5.x?

    Hi,
    the documentation of Oracle 9i DB says, there is a new archiv for the jdbc driver: ojdbc14.jar. Until now we used classes12.zip (or classes12.jar).
    But why is the new driver lib missing in JDev 9.0.5.x?
    Best regards,
    Torsten.

    Can you please recommend some way to use ojdbc14.jar with JDeveloper 9.0.5.2? Ommitting Oracle JDBC from the project libraries and including a new library for ojdbc14.jar does not work for all classpath issues, such as for data source definitions in the data-sources.xml file. What does seem to work is replacing jdbc/lib/classes12dms.jar with ojdbc14.jar but I'm not sure if this will cause strange side effects. Is there any cleaner way of using ojdbc14.jar?
    Thanks,
    Jeff

  • EJB - no suitable driver found for oracle jdbc driver

    this is the exception i got when i run the client:
    java.rmi.RemoteException: nested exception is: java.sql.SQLException: No suitable driver; nested exception is:
    java.sql.SQLException: No suitable driver
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:537)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at com.sun.enterprise.resource.JdbcUrlAllocator.createResource(JdbcUrlAllocator.java:45)
    at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:177)
    at com.sun.enterprise.resource.JdbcXAConnection.<init>(JdbcXAConnection.java:56)
    at com.sun.enterprise.resource.Jdbc10XaAllocator.createResource(Jdbc10XaAllocator.java:66)
    at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:177)
    at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:126)
    at com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(JdbcDataSource.java:137)
    at com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:74)
    at bmp.TaxEJB.ejbCreate(TaxEJB.java:34)
    at bmp.TaxEJB_RemoteHomeImpl.create(TaxEJB_RemoteHomeImpl.java:32)
    at bmp._TaxEJB_RemoteHomeImpl_Tie._invoke(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:520)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:210)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:112)
    at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:255)
    at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
    at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)
    this is the implementation file (TaxEJB):
    package bmp;
    import java.sql.*;
    import javax.sql.*;
    import javax.naming.*;
    import java.util.*;
    import javax.ejb.*;
    public class TaxEJB implements EntityBean {
    private String stateCode;
    private float taxRate;
    private EntityContext ctx;
    private DataSource ds;
    private String dbName = "jdbc/Oracle";
    private Connection con;
    public void setTaxRate(float taxRate) {
    this.taxRate = taxRate;
    public float getTaxRate() {
    return this.taxRate;
    public String ejbCreate(String stateCode, float taxRate)
    throws CreateException {
    if (stateCode == null) {
    throw new CreateException("The State Code is required.");
    try {
    String sqlStmt = "INSERT INTO TaxTable VALUES ( ? , ? )";
    con = ds.getConnection();
    PreparedStatement stmt = con.prepareStatement(sqlStmt);
    stmt.setString(1, stateCode);
    stmt.setFloat(2, taxRate);
    stmt.executeUpdate();
    stmt.close();
    } catch (SQLException sqle) {
    throw new EJBException(sqle);
    } finally {
    try {
    if (con != null) {
    con.close();
    } catch (SQLException sqle) {}
    this.stateCode = stateCode;
    this.taxRate = taxRate;
    return stateCode;
    public void ejbPostCreate(String stateCode, float taxRate) {}
    public void setEntityContext(EntityContext context) {
    this.ctx = context;
    try {
    InitialContext initial = new InitialContext();
    ds = (DataSource)initial.lookup(dbName);
    } catch (NamingException ne) {
    throw new EJBException(ne);
    public void unsetEntityContext() {
    ctx = null;
    public void ejbActivate() {
    stateCode = (String)ctx.getPrimaryKey();
    public void ejbPassivate() {
    stateCode = null;
    public void ejbLoad() {
    try {
    String sqlStmt = "SELECT stateCode, taxRate FROM TaxTable " +
    "WHERE stateCode = ? ";
    con = ds.getConnection();
    PreparedStatement stmt = con.prepareStatement(sqlStmt);
    stmt.setString(1, stateCode);
    ResultSet rs = stmt.executeQuery();
    if (rs.next()) {
    this.taxRate = rs.getFloat("taxRate");
    stmt.close();
    } else {
    stmt.close();
    throw new NoSuchEntityException("State Code: " + stateCode);
    } catch (SQLException sqle) {
    throw new EJBException(sqle);
    } finally {
    try {
    if (con != null) {
    con.close();
    } catch (SQLException sqle) {}
    public void ejbStore() {
    try {
    String sqlStmt = "UPDATE TaxTable SET "
    + "taxRate = ? " + "WHERE stateCode = ?";
    con = ds.getConnection();
    PreparedStatement stmt = con.prepareStatement(sqlStmt);
    stmt.setFloat(1, taxRate);
    stmt.setString(2, stateCode);
    if (stmt.executeUpdate() != 1) {
    throw new EJBException("Object state could not be saved");
    stmt.close();
    } catch (SQLException sqle) {
    throw new EJBException(sqle);
    } finally {
    try {
    if (con != null) {
    con.close();
    } catch (SQLException sqle) {}
    public void ejbRemove() {
    try {
    String sqlStmt = "DELETE FROM TaxTable WHERE stateCode = ? ";
    con = ds.getConnection();
    PreparedStatement stmt = con.prepareStatement(sqlStmt);
    stmt.setString(1, stateCode);
    stmt.executeUpdate();
    stmt.close();
    } catch (SQLException sqle) {
    throw new EJBException(sqle);
    } finally {
    try {
    if (con != null) {
    con.close();
    } catch (SQLException sqle) {}
    public String ejbFindByPrimaryKey(String primaryKey)
    throws FinderException {
    try {
    String sqlStmt = "SELECT stateCode "
    + "FROM TaxTable WHERE stateCode = ? ";
    con = ds.getConnection();
    PreparedStatement stmt = con.prepareStatement(sqlStmt);
    stmt.setString(1, primaryKey);
    ResultSet rs = stmt.executeQuery();
    if (!rs.next()) {
    throw new ObjectNotFoundException();
    rs.close();
    stmt.close();
    return primaryKey;
    } catch (SQLException sqle) {
    throw new EJBException(sqle);
    } finally {
    try {
    if (con != null) {
    con.close();
    } catch (SQLException sqle) {}
    public Collection ejbFindInRange(float lowerLimit, float upperLimit)
    throws FinderException {
    try {
    String sqlStmt = "SELECT stateCode from TaxTable "
    + "WHERE taxRate BETWEEN ? AND ?";
    con = ds.getConnection();
    PreparedStatement stmt = con.prepareStatement(sqlStmt);
    stmt.setFloat(1, lowerLimit);
    stmt.setFloat(2, upperLimit);
    ResultSet rs = stmt.executeQuery();
    ArrayList list = new ArrayList();
    while (rs.next()) {
    String id = rs.getString(1);
    list.add(id);
    stmt.close();
    return list;
    } catch (SQLException sqle) {
    throw new EJBException(sqle);
    } finally {
    try {
    if (con != null) {
    con.close();
    } catch (SQLException sqle) {}
    this is the setting in resource.properties:
    jdbcDataSource.5.name=jdbc/Oracle
    jdbcDataSource.5.url=jdbc\:oracle\:thin\:@nicole\:1521\:NICOLE
    jdbcDriver.1.name=oracle.jdbc.driver.OracleDriver
    this is my classpath setting:
    %J2EE_HOME%\lib\j2ee.jar;%J2EE_HOME%\lib\system\cloudscape.jar;%J2EE_HOME%\lib\system\cloudutil.jar;%J2EE_HOME%\lib\cloudscape\RmiJdbc.jar;%J2EE_HOME%\lib\system\classes12.jar;.
    since i already declare classpath for oracle JDBC Driver (classes12.jar), why the program still can't found the oracle.jdbc.driver.OracleDriver? please help. thanks.

    Hi,
    I m trying to connect ORACLE9i using JSP.But i encounter the error java.sql.SQlException no suitable driver found.My code is as follows.
    <html>
    <head><title>oracle</title></head>
    <body>
    <%@ page language="java"%>
    <%@ page import="java.sql.*" %>
    <%
    String eid=new String();
    String en=new String();
    try
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    catch(ClassNotFoundException cnfe)
         out.println("Failed to load Jdbc Odbc driver");
    try{
    Connection con = DriverManager.getConnection("jdbc:oracle:thin@localhost:1521:ORACLE9I","scott","tiger");
    Statement ps = con.createStatement();
    try{
    ResultSet rs = ps.executeQuery("select * from empDetails");
    while(rs.next())
         out.println(rs.getString(1));
         out.println(rs.getString(2));
    rs.close();
    }catch(SQLException se)
    out.println(se);
    ps.close();
    con.close();
    catch(Exception e)
         out.println(e);
    catch (Exception e){
    out.println(e);
    %>
    </body></html>
    Pls anyone give me a solution.Its really urgent.

  • Javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver

    Hi.
    I've got this piece of code into a servlet:
    <%@page language="java" import="java.sql.*"%>
    <%
    Driver DriverRecordset1 = (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection Conn = DriverManager.getConnection("jdbc:oracle:thin:@myserver:1521:SID","system","manager");
    When starting Tomcat, I included into startup.bat:
    set CLASSPATH=%CLASSPATH%;d:\orant\jdbc\classes102.zip (it exists)
    But when executing the code, I get this error message:
    javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
    What am I doing wrong?
    Thank you very much.

    The whole message:
    javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown Source)
         at mypage_1._jspService(mypage_1.java:112)
         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
         at org.apache.tomcat.core.Handler.service(Unknown Source)
         at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
         at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
         at org.apache.tomcat.core.ContextManager.service(Unknown Source)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:484)
    ================
    If I write only:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    I get the same error.

Maybe you are looking for