Oracle oci8 driver

Hi All,
I am able to connect with a oracle database using the thin driver(windows os),
but not able to connect with the oci8 driver, inspite of putting the dll that is required.
It is throwing the exception below,
Exception in thread "main" java.lang.UnsatisfiedLinkError: get_env_handle
at oracle.jdbc.oci8.OCIEnv.getEnvHandle(OCIEnv.java:70)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:359)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:252)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va, Compiled Code)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:457)
at java.sql.DriverManager.getConnection(DriverManager.java:159)
at JDBCVersion.verMeth(JDBCVersion.java, Compiled Code)
at JDBCVersion.main(JDBCVersion.java:41)
Arun

Actually, I meant a version conflict between the Oracle JDBC drivers (in classes12.zip) and the installed OCI binaries on the same computer. If both the JDBC and OCI dll's those that were installed from the same Oracle distribution media you should not be getting these errors. Double check your path and classpath. Make sure the versions are precisely the same (8.1.7 for example, not just 8i).
Chuck

Similar Messages

  • Oracle (OCI8) driver not available!

    I have installed DAC successfully. So I start my client and am trying to create a new connection.
    I did the following:
    1) Clicked Configure
    2) by default, Create connection is selected, I clicked Next
    3) Entered Name, selected Connection Type as Oracle(OCI8), entered TNS names as ORCL and created new authentication file.
    4) Clicked Test Connection and it shows the error 'Can't connect to the database'. When I click Show details, I get the following:
    MESSAGE:::Oracle (OCI8) driver not available!
    EXCEPTION CLASS::: java.lang.IllegalArgumentException
    com.siebel.etl.gui.login.LoginDataHandler$LoginStructure.testConnection(LoginDataHandler.java:512)
    com.siebel.etl.gui.login.LoginDataHandler.testConnection(LoginDataHandler.java:386)
    com.siebel.etl.gui.login.ConnectionTestDialog$Executor.run(ConnectionTestDialog.java:290)
    ::: CAUSE :::
    MESSAGE:::oracle.jdbc.driver.OracleDriver
    EXCEPTION CLASS::: java.lang.ClassNotFoundException
    java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    java.security.AccessController.doPrivileged(Native Method)
    java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    java.lang.Class.forName0(Native Method)
    java.lang.Class.forName(Class.java:169)
    com.siebel.etl.gui.login.LoginDataHandler$LoginStructure.testConnection(LoginDataHandler.java:510)
    com.siebel.etl.gui.login.LoginDataHandler.testConnection(LoginDataHandler.java:386)
    com.siebel.etl.gui.login.ConnectionTestDialog$Executor.run(ConnectionTestDialog.java:290)
    Can somebody help me resolve this issue?
    Thanks in advance!!!

    Resolved. ojdbc14.jar was missing in \bifoundation\dac\lib.
    Downloaded and copied the file to the location and rebooted my system.

  • 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

  • Oracle oci8 driver problem

    Hello !
    I work with Weblogic 701, oracle 9.2.0.1 database, oracle 9.2.0.2 client, and
    oracle jdbc drivers classes12.zip
    When I connect with the oci8 (not the thin) driver and try to execute the application,
    I get this error :
    java.lang.UnsatisfiedLinkError: Native Library D:\oracle\ora92\bin\orageneric9.dll
    already loaded in another classloader
    I have to shutdown weblogic and start it again. If I redeploy my application,
    I get the same error and I have to shutdown again ...
    and when I connect with the thin driver and try to execute the extract method
    on a XMLType object, I always have a sqlException.
    I see on the web that the extract method can only be applied with the oci8 driver.
    How can I do ???
    Thx

    Hi. Go to oracle's site and download the very latest appropriate thin
    driver for your DBMS, and put the driver ahead of all weblogic stuff in the
    classpath the server is going to use.
    Joe
    Partyboy wrote:
    Hello !
    I work with Weblogic 701, oracle 9.2.0.1 database, oracle 9.2.0.2 client, and
    oracle jdbc drivers classes12.zip
    When I connect with the oci8 (not the thin) driver and try to execute the application,
    I get this error :
    java.lang.UnsatisfiedLinkError: Native Library D:\oracle\ora92\bin\orageneric9.dll
    already loaded in another classloader
    I have to shutdown weblogic and start it again. If I redeploy my application,
    I get the same error and I have to shutdown again ...
    and when I connect with the thin driver and try to execute the extract method
    on a XMLType object, I always have a sqlException.
    I see on the web that the extract method can only be applied with the oci8 driver.
    How can I do ???
    Thx

  • Does multilingual work with Oracle oci8 Driver? I am facing problems with oci8 while thin driver works fine ...

    Hi, I am currently working on iPlanet 6.0 SP4 with oracle 8.1.6. I am planning to make my application language independent. while testing I figured out that if i use oci8 driver or oracle, it doesn't support other language characters while the thin driver supports fine. Can anybody help me regarding this? Is this a bug, or some possible configuration issue? Has somebody came across this problem before? How do i go about it ?

    We faced same issue. Looks like the native driver does not support the automatic data encoding/decoding from/to database. You can always workaround this by reading everything as byte stream and then by letting java handle the encoding/decoding. But we decided to use type4 thin driver which does this automatically if you set the content type. Anyway we are told that later versions of IAS may not support native drivers, so if you are serious about multi language shift to type4 thin drivers now itself.

  • Memory leakage with oracle oci driver

    I have developed a Solaris8 client/server application using the JAVA IDL CORBA implementation. The client sends requests to the server to update the database (database is Oracle 8.1.7 and I connect to it using oci oracle drivers). Requests are sent one at a time. No concurrent connections. I have a static connection that I establish with database once I start the server. If that connection is lost for any reason (timeout or database faliure) the application tries automatically to reconnect to database. I have noticed that if the new connection to database fails and an sql exception is thrown, memory used by the application process increases. This memory is not garbage collected so application hangs. I tried similar behaviour with the oracle thin driver and things went fine. There was no memory leakage.
    I would really appreciate, if you can help me in this since I can't use the thin driver because of failover limitations.

    I have noticed
    that if the new connection to database fails and an
    sql exception is thrown, memory used by the
    application process increases.
    How have you noticed this?I noticed this using the command pmap under solaris it operating system
    every time I test reconnecting to database I go and check the memory used by the application before after attepmting to reconnect:
    /usr/proc/bin/pmap [myapp pid] | tail -1
    If I'm using normal connection then the memory will be increased by 100KB. If I'm using the OraclePooledConnection class then the increase will be something like 500KB. Again this is if still there is a problem connecting to database. If connection to database is okay then no memory increase at all.
    This memory is not
    garbage collected so application hangs.
    Then it isn't a java problem. When java runs out of memory it throws a out of memory exception.Well I'm not saying it is a java problem for sure. I suspect that it might be oracle oci8 driver problem. I would appreciate if anyone can help in specifying teh source of the error.
    I tried
    similar behaviour with the oracle thin driver and
    things went fine. There was no memory leakage.
    I would really appreciate, if you can help me in this
    since I can't use the thin driver because of failover
    limitations.
    I don't understand that last sentence at all.What I mean here is that instead of using the oci8 driver to connect to database I used the thin driver and kept everything else the same. I simulated the faliure to reconnect to database and based on the pmap command observations there was no memory leakage.
    I want to know what is needed to be done in order to get a normal behavior once using the oci8 drivers.

  • JDBC-ORACLE CONNECTIVITY ISSUE WITYH OCI8 DRIVER using oracle 11g client..

    JDBC-ORACLE CONNECTIVITY ISSUE WITYH OCI8 DRIVER using oracle 11g client..
    I am getting below error when i m trying to access oracle db using oracle 11g client. It works with earlier oracle client versions. how do i resolve this. is there any issue with version of ojdbc6.jar that i am using??? I cant use thin driver since its an old application for which i dont have source files.
    Apr 6, 2013 1:00:59 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
    at java.lang.Runtime.loadLibrary0(Runtime.java:822)
    at java.lang.System.loadLibrary(System.java:992)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:262)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:346)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at PettyCash.SysDate.getSysSubSys(SysDate.java:232)
    at org.apache.jsp.PettyCash.index_jsp._jspService(org.apache.jsp.PettyCash.index_jsp:186)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Code is as follow for reference
    import oracle.jdbc.driver.*;
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    conn = DriverManager.getConnection ("jdbc:oracle:oci8:@" + database,db_user, db_pass);
    eNVIRONMENT VARIABLES set are as follows:
    classpath
    C:\Program Files\apache-tomcat-5.5.12\common\lib\servlet-api.jar;C:\Program Files\apache-tomcat-5.5.12\webapps\ROOT\WEB-INF\lib\classes12.jar;C:\Program Files\apache-tomcat-5.5.12\webapps\ROOT\WEB-INF\lib\ojdbc6.jar;
    JAVA_HOME
    C:\Program Files\Java\jdk1.5.0_04
    PATH
    C:\Program Files\Java\jdk1.5.0_04\bin
    ORACLE_HOME
    D:\Oracle11\product\11.2.0\client_1\BIN

    Apr 8, 2013 5:24:06 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
         at org.apache.jsp.abc.index_jsp._jspService(org.apache.jsp.abc.index_jsp:280)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)

  • Cannot connect using oracle jdbc oci8 driver

    I am using Oracle 8.1.5 JDBC oci8 driver, but when try to connect, always got ERROR: java.lang.UnsatisfiedLinkError:make_c_state
    With the same code, but change to connect with thin driver, it works fine. Pls tell me the problem. Thank you.

    Hi,
    Here is the snippet code from oracle,
    // You need to import the java.sql package to use JDBC
    import java.sql.*;
    // We import java.io to be able to read from the command line
    import java.io.*;
    class JdbcCheckup
    public static void main (String args [])
    throws SQLException, IOException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    // Prompt the user for connect information
    System.out.println ("Please enter information to test connection to the database");
    String user;
    String password;
    String database;
    user = readEntry ("user: ");
    int slash_index = user.indexOf ('/');
    if (slash_index != -1)
    password = user.substring (slash_index + 1);
    user = user.substring (0, slash_index);
    else
    password = readEntry ("password: ");
    database = readEntry ("database (a TNSNAME entry): ");
    System.out.print ("Connecting to the database...");
    System.out.flush ();
    System.out.println ("Connecting...");
    Connection conn =
    DriverManager.getConnection ("jdbc:oracle:oci8:@" + database,
    user, password);
    System.out.println ("connected.");
    // Create a statement
    Statement stmt = conn.createStatement ();
    // Do the SQL "Hello World" thing
    ResultSet rset = stmt.executeQuery ("select 'Hello World' from dual");
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println ("Your JDBC installation is correct.");
    // close the resultSet
    rset.close();
    // Close the statement
    stmt.close();
    // Close the connection
    conn.close();
    // Utility function to read a line from standard input
    static String readEntry (String prompt)
    try
    StringBuffer buffer = new StringBuffer ();
    System.out.print (prompt);
    System.out.flush ();
    int c = System.in.read ();
    while (c != '\n' && c != -1)
    buffer.append ((char)c);
    c = System.in.read ();
    return buffer.toString ().trim ();
    catch (IOException e)
    return "";
    This code can be run without specifying a TNSNAME connection string, as the oci8 jdbc driver will take localhost as default.
    OR
    Only specifying the TNSNAME is enough, i.e. edit %ORACLE_HOME%\network\ADMIN\TNSNAMES.ORA file and locate the XXXXX.WORLD entry in the file. This is the TNSNAME entry referred to.
    Without TNSNAME entry you can re-run,
    %ORACLE_HOME%\jdbc\demo\samples\oci8\basic-samples> java JdbcCheckup
    Please enter information to test connection to the database
    user: system
    password: manager
    database (a TNSNAME entry):
    Connecting to the database...Connecting...
    connected.
    Hello World
    Your JDBC installation is correct.
    Hope that helps.
    Best Luck!
    Senthil Babu J

  • Using OCI8 driver with Sun ONE AS7 and Oracle 9

    Hi
    I am writing a bean that needs to access an Oracle Database.
    I have defined in AS7 a connection pool, that looks like:
    <jdbc-connection-pool steady-pool-size="8" max-pool-size="32" max-wait-time-
    in-millis="60000" pool-resize-quantity="2" idle-timeout-in-seconds="300" is-isol
    ation-level-guaranteed="false" is-connection-validation-required="false" connect
    ion-validation-method="auto-commit" fail-all-connections="false" datasource-clas
    sname="oracle.jdbc.driver.OracleDriver" name="Oracle_EUNDEV">
    <property value="user" name="user"/>
    <property value="passwd" name="password"/>
    <property value="jdbc:oracle:oci8:@eundev:EUNDEV" name="URL"/>
    </jdbc-connection-pool>
    My code does a JNDI lookup DataSource, which succeeds.
    However, the getConnection always fails, and throws the following exception:
    [02/May/2003:16:28:06] WARNING ( 794): CORE3283: stderr: java.lang.NoSuchMethodException: setpassword
    [02/May/2003:16:28:06] WARNING ( 794): CORE3283: stderr: at com.sun.enterprise.util.Utility.invokeSetMethodCaseInsensitive(Utility.java:373)
    [02/May/2003:16:28:06] WARNING ( 794): CORE3283: stderr: at com.sun.enterprise.repository.JdbcConnectionPool.createDataSource(JdbcConnectionPool.java:238)
    [02/May/2003:16:28:06] WARNING ( 794): CORE3283: stderr: at com.sun.enterprise.resource.JdbcUrlAllocator.createResource(JdbcUrlAllocator.java:80)
    [02/May/2003:16:28:06] WARNING ( 794): CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResourcePool.createSteadyResources(IASNonSharedResourcePool.java:856)
    I used dbping tool from iplanet and could define a new connection and connect successfully,
    But trying to use the existing connection always fail with the same 'MissingMethod' exception.
    Can someone help?
    Thanks a lot
    Jean-Noel Colin

    Here is your problem:
    jdbc:oracle:oci8:@eundev:EUNDEV
    the last part is wrong. Driver will see the EUNDEV as password. After @ , just specify the tnsName that you have, no " : "
    you do have a property called "password" already.
    It should be something like this:
    jdbc:oracle:oci8@eundev

  • Help - Could not load 'oracle.jdbc.driver.OracleDriver ...

    I'm using oci8 to connect to the Oracle database.
    URL: jdbc:oracle:oci8:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(PORT=1527)(HOST=testhost)))(CONNECT_DATA=(SID=fnoe2pa)))
    When I tried to start the weblogic server, I got the following errors:
    Can you suggest what I should do next (step-wise)??? Thanks, Bobby
    <Sleeping in createResource()>
    ####<15/08/2002 14:09:43> <Error> <JDBC> <qawebmethods> <myserver>
    <main> <system> <> <001060> <Cannot startup connection pool
    "pool/test_myapp" weblogic.common.ResourceException:
    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(ConnectionEnvFactory.java:212)
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:134)
         at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:705)
         at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
         at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:650)
         at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:360)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:285)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:239)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:199)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:360)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy31.updateDeployments(Unknown Source)
         at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2977)
         at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:372)
         at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:160)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:360)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy42.start(Unknown Source)
         at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:480)
         at weblogic.management.Admin.startApplicationManager(Admin.java:1234)
         at weblogic.management.Admin.finish(Admin.java:644)
         at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:524)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:207)
         at weblogic.Server.main(Server.java:35)
    >
    ####<15/08/2002 14:09:43> <Info> <JDBC> <qawebmethods> <myserver>
    <main> <system> <> <001082> <Creating Data Source named
    jdbc/test_myapp for pool pool/test_myapp>
    ####<15/08/2002 14:09:43> <Info> <JDBC> <qawebmethods> <myserver>
    <main> <system> <> <001070> <Checking existence of connection pool
    pool/test_myapp requested by user system>
    ####<15/08/2002 14:09:43> <Error> <JDBC> <qawebmethods> <myserver>
    <main> <system> <> <001059> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(jdbc/test_myapp) can't
    be created with non-existent Pool (connection or multi)
    (pool/test_myapp)>
    ####<15/08/2002 14:09:50> <Info> <EJB> <qawebmethods> <myserver>
    <main> <system> <> <010008> <EJB Deploying file: myapp-ejb.jar>
    ####<15/08/2002 14:09:50> <Warning> <J2EE> <qawebmethods> <myserver>
    <main> <system> <> <160007> <You are running WebLogic Server with J2EE
    1.3 features enabled. The implementation of specific J2EE 1.3 features
    (EJB 2.0, JSP 1.2, Servlet 2.3, and J2EE Connector Architecture 1.0)
    in BEA WebLogic Server 6.1 is of a non-final version of the
    appropriate specification. It is subject to change in future releases
    once the specification becomes finalized. This may cause application
    code developed for BEA WebLogic Server 6.1 that uses the new features
    of J2EE 1.3 to be incompatible with the J2EE 1.3 platform supported in
    future releases of BEA WebLogic Server.>
    ####<15/08/2002 14:09:59> <Error> <J2EE> <qawebmethods> <myserver>
    <main> <system> <> <160001> <Error deploying application myapp-ejb:
    Unable to deploy EJB: Counter from myapp-ejb.jar:
    The DataSource with the JNDI name: jdbc/test_myapp could not be
    located. Please ensure that the DataSource has been deployed
    successfully and that the JNDI name in your EJB Deployment descriptor
    is correct.
    >
    ####<15/08/2002 14:09:59> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101053> <[HTTP myserver] Loading web app: myapp>
    ####<15/08/2002 14:09:59> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101059> <[myserver] Loading myapp from WAR file:
    C:\bea\wlserver6.1\.\config\mydomain\applications\.wlnotdelete\wlap31483\myapp.war>
    ####<15/08/2002 14:09:59> <Warning> <J2EE> <qawebmethods> <myserver>
    <main> <system> <> <160007> <You are running WebLogic Server with J2EE
    1.3 features enabled. The implementation of specific J2EE 1.3 features
    (EJB 2.0, JSP 1.2, Servlet 2.3, and J2EE Connector Architecture 1.0)
    in BEA WebLogic Server 6.1 is of a non-final version of the
    appropriate specification. It is subject to change in future releases
    once the specification becomes finalized. This may cause application
    code developed for BEA WebLogic Server 6.1 that uses the new features
    of J2EE 1.3 to be incompatible with the J2EE 1.3 platform supported in
    future releases of BEA WebLogic Server.>
    ####<15/08/2002 14:09:59> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101031>
    <[WebAppServletContext(1412030,myapp,/myapp)] extracting classfiles to
    C:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\wlap31483\WEB-INF\_tmp_war_myapp:>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101032>
    <[WebAppServletContext(1412030,myapp,/myapp)] extracted classfiles
    successfully...>
    ####<15/08/2002 14:10:04> <Info> <HTTP Session> <qawebmethods>
    <myserver> <main> <system> <> <100037> <Creating SessionContext of
    type: memory for webapp: /myapp>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101047>
    <[WebAppServletContext(1412030,myapp,/myapp)] registering classpath
    servlet with initArgs 'null'>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101047>
    <[WebAppServletContext(1412030,myapp,/myapp)] registering getior
    servlet with initArgs 'null'>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101047>
    <[WebAppServletContext(1412030,myapp,/myapp)] registering tunneling
    servlets with initArgs 'wl-dispatch-policy=direct'>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101047>
    <[WebAppServletContext(1412030,myapp,/myapp)] registering JSPServlet
    with initArgs '[JspConfig:
    verbose=true,packagePrefix=jsp_servlet,-compiler=javac,compileFlags=,workingDir=C:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\wlap31483\WEB-INF\_tmp_war_myapp,pageCheckSeconds=1,superclass=null,keepgenerated=false,precompileContinue=false,compilerSupportsEncoding=true,encoding=null,defaultfilename=index.jsp,compilerclass=null,noTryBlocks=false]'>
    ####<15/08/2002 14:10:04> <Debug> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101097> <Registering ServletContext:
    "myapp:/myapp">
    ####<15/08/2002 14:10:04> <Info> <J2EE> <qawebmethods> <myserver>
    <main> <system> <> <160003> <Deployed : myapp>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101133> <Initializing WEB server myserver>
    ####<15/08/2002 14:10:04> <Notice> <Management> <qawebmethods>
    <myserver> <main> <system> <> <141052> <Application Poller started for
    development server.>
    ####<15/08/2002 14:10:04> <Notice> <WebLogicServer> <qawebmethods>
    <myserver> <ListenThread> <system> <> <000202> <ListenThread listening
    on port 7001>
    ####<15/08/2002 14:10:04> <Info> <NT Performance Pack> <qawebmethods>
    <myserver> <ListenThread> <system> <> <000000> <NATIVE: NTSocketMuxer
    was built on Nov 1 2001 16:39:28
    >
    ####<15/08/2002 14:10:04> <Notice> <WebLogicServer> <qawebmethods>
    <myserver> <SSLListenThread> <system> <> <000202> <SSLListenThread
    listening on port 7002>
    ####<15/08/2002 14:10:05> <Notice> <Management> <qawebmethods>
    <myserver> <main> <system> <> <141030> <Starting discovery of Managed
    Server... This feature is on by default, you may turn this off by
    passing -Dweblogic.management.discover=false>
    ####<15/08/2002 14:10:05> <Notice> <WebLogicServer> <qawebmethods>
    <myserver> <main> <system> <> <000331> <Started WebLogic Admin Server
    "myserver" for domain "mydomain" running in Development Mode>
    ####<15/08/2002 14:10:11> <Info> <NT Performance Pack> <qawebmethods>
    <myserver> <ExecuteThread: '14' for queue: 'default'> <> <> <000000>
    <Allocating: '2' NT reader threads>
    ####<15/08/2002 14:10:13> <Info> <HTTP> <qawebmethods> <myserver>
    <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system>
    <> <101047> <[WebAppServletContext(5367844,console,/console)] actions:
    init>
    ####<15/08/2002 14:10:18> <Info> <HTTP> <qawebmethods> <myserver>
    <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system>
    <> <101047> <[WebAppServletContext(5367844,console,/console)]
    FileServlet: init>
    ####<15/08/2002 14:10:18> <Info> <HTTP> <qawebmethods> <myserver>
    <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system>
    <> <101047> <[WebAppServletContext(5367844,console,/console)]
    FileServlet: Using standard I/O>

    "thorick" <[email protected]> wrote in message news:<[email protected]>...
    Most likely, the OCI libraries could not be loaded.
    Before continuing down this path, is there any reason
    why you want to use an OCI based Driver as opposed to the
    all Java Oracle thin driver ?There is indeed a valid reason for my choice.
    I am currently connecting to the Oracle "Rdb" 7.0 database (located on
    VMS) - not Oracle Oracle.
    The SQL Service software we're currently using is version 7.1. This
    version works well with the OCI8 driver (when connecting to the
    database from Windows NT). This version of SQL Service however does
    NOT work for the THIN driver (unless we upgrade the SQL Service to
    version 7.1.5.5 - which we're not prepared to do so because it is not
    stable enough from our previous test/trials). SQLSRV Version 7.1.5.5
    works for THIN driver but it will result in uncommitted
    transactions/unresolved connection/stopping of listener issues and
    there is a need to restart the service from time to time. Oracle has
    since confirmed that this is a bug that they have yet to resolve...
    So we have to stick to OCI8 (THICK) for the time being. I would really
    appreciate it very much if you can tell me the various OCI libraries
    that I need to load (in terms of WebLogic Server config file settings
    etc..).
    By the way I have already installed the Oracle 8 client software on
    the NT server (where WebLogic Server is) and I have also set up the
    relevant SID (using the Net8 Assistant) that points to the Oracle Rdb
    database on the VMS. I have also tried using SQL*Plus to connect to
    the database and I can connect properly to the database. But WebLogic
    simply doesn't seem to load the software.
    Help...
    Regards,
    Bobby Brown, writing from Australia.

  • Oracle OCI Driver

    Hi all,
    We have a setup accessing an Oracle-database (9.0.1 and 9i) from a
    java program using an Oracle thin driver like this:
    jdbc:oracle:thin:@host:port:sid
    This works fine. Now we wanted to try the OCI-driver for speed
    comparision (mainly bypassing socket communication).
    jdbc:oracle:oci8:@host:port:sid
    This didn't work. We use the classes12.zip for Oracle 9.0.1. downloaded
    from OTN. The error is:
    java.lang.NoSuchFieldError: OCIEnvHandle
    at oracle.jdbc.oci8.OCIDBAccess.make_c_state(Native Method)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:287)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:116)
    at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:98)
    at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
    at de.otto.noa.standard.database.backend.ConnectionOracle.connect(ConnectionOracle.java:64)
    The last line given is the first line in our own code.
    The SHLIB_PATH points to the lib32 directories. If we set them to the lib directories
    the error changes to :
    java.lang.UnsatisfiedLinkError: /opt/oracle/app/oracle/product/9i/lib/libocijdbc9.sl: Exec format error
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:294)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:287)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:116)
    at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:98)
    at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
    at de.otto.noa.standard.database.backend.ConnectionOracle.connect(ConnectionOracle.java:64)
    Any suggestions on what to check up on?
    Also I'd like to know whether it is correct that the Oracle 9 driver uses oci8?
    regards,
    Frieder Schenke

    Hi Elango,
    One cannot connect to the database using host:port:sid when using OCI driver. Strange.
    It has to be a TNSname or a url .
    jdbc:oracle:oci8:@(description=(address=(host=myhost)(protocol=tcp)(port=1521))(connect_data=(sid=orcl)))I tried this (adapted to our database of course) and also (because we have tnsnames.ora setup too):
    jdbc:oracle:oci8:@tns_name
    With the same effects. ('tnsping tns_name' works)
    I think the problem lies somewhere else. The system doesn't even try to actually connect
    before it throws that exception. Some driver incompatibility, I guess. But I don't know,
    what I did wrong or where to look. Especially that 'Exec format error' is suspicious,
    because we'd like to use 64bit if possible.
    Also, for when this starts to work, I'd like to know how to make sure there is no socket
    connection being used. I vaguely remember something like
    jdbc:oracle:oci8:@beqlocal:tns_name
    but I don't know the exact syntax. There are several database on that machine, so just
    beqlocal wouldn't be enough, unless it also uses the environment-variable
    ORACLE_SID
    regards,
    Frieder Schenke
    PS : Peter is my team chef, I'm using his OTN account

  • JDBC OCI8 driver for Redhat linux 6.1

    I have oracle 8.1.5.0.1 Enterprise server loaded on RedHat linux 6.1 and i am trying to access database through jdbc. When I am trying to execute one of the compiled class say Employee.class provided in the JDBC samples directory using OCI* driver it is coming up with an error libocijdbc8.so can not open shared object file: no such file or directory. This libocijdbc8.so file can not be found on the disk. Can some one please provide me leads where can find this driver? ar Oracle's website or somewhere else?. Any help in this regard will be greatly appreciated.
    Thanks
    Naidu

    One more thing, I tried this with both jdk1.1.6_v5 and jdk1.1.8 and also i have class path pointing to $ORACLE_HOME/jdbc/lib/classes111.zip file. and the code is
    /* This sample shows how to list all the names from the EMP table
    // You need to import the java.sql package to use JDBC
    import java.sql.*;
    class Employee
    public static void main (String args [])
    throws SQLException, ClassNotFoundException
    Class.forName("oracle.jdbc.driver.OracleDriver");
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    // Connect to the database
    // You can put a database name after the @ sign in the connection URL.
    Connection conn =
    DriverManager.getConnection ("jdbc:oracle:oci8:@NaiduT2", "scott", "tiger");
    // Create a Statement
    Statement stmt = conn.createStatement ();
    // Select the ENAME column from the EMP table
    ResultSet rset = stmt.executeQuery ("select ENAME from EMP");
    // Iterate through the result and print the employee names
    while (rset.next ())
    System.out.println (rset.getString (1));
    // Close the RseultSet
    rset.close();
    // Close the Statement
    stmt.close();
    // Close the connection
    conn.close();
    }

  • Issue encountered when Login as sysdba role using Thin Oracle JDBC Driver

    Hello all,
    we are now considering to use Thin oracle JDBC driver to create database in our project, but we met one issue when we tried to connect to oracle as sysdba role using Thin driver, and it throws java.sql.SQLException: Io Exception: SO Exception was generated, I have found some tips on oracle jdbc website and it says :
    How do I connect as SYSDBA or SYSOPER?
    The only way to do this is to use the Properties object when connecting, rather than specifying the username and password as strings. Put the username into the "user" property, and the password into the "password" property. Then, put the mode into the "internal_logon" property. Something like the following:
    Properties props = new Properties();
    props.put("user", "scott");
    props.put("password", "tiger");
    props.put("internal_logon", "sysoper");
    Connection conn = DriverManager.getConnection (url, props);
    When connecting as SYSDBA or SYSOPER using the Thin driver, the RDBMS must be configured to use a password file. See "Creating and Maintaining a Password File" in the "Oracle Database Administrator's Guide".
    So, i did execute orapwd command to create a password file and also set remote_login_passwordfile=execlusive in my initxxx.ora initial parameter file, however, when i tried to connect, it failed.
    private static void createEmsdbDatabase(){
    String url = "jdbc:oracle:thin:@localhost:1521:";
    StringBuffer sqlStatement = new StringBuffer();
    sqlStatement.append("create database xxx");
    sqlStatement.append("maxdatafiles 254 ");
    sqlStatement.append("maxinstances 8 ");
    sqlStatement.append("maxlogfiles 32 ");
    sqlStatement.append("character set UTF8 ");
    sqlStatement.append("national character set UTF8 ");
    sqlStatement.append("DATAFILE 'c:\\oracle\\xxx\\system01.dbf' SIZE 18M REUSE ");
    sqlStatement.append("logfile 'c:\\oracle\\xxx\\redo01.log' SIZE 2M REUSE, ");
    sqlStatement.append("'c:\\oracle\\xxx\\redo02.log' SIZE 2M REUSE, ");
    sqlStatement.append("'c:\\oracle\\xxx\\redo03.log' SIZE 2M REUSE ");
    try {
    DriverManager.registerDriver(new OracleDriver());
    Properties props = new Properties();
    props.put("user", "sys");
    props.put("password", "password");
    props.put("database","xxx");
    props.put("internal_logon", "sysdba");
    Connection conn = DriverManager.getConnection(url, props);
    Statement statement = conn.createStatement();
    statement.executeUpdate(sqlStatement.toString());
    statement.close();
    conn.close();
    } catch (SQLException e) {
    e.printStackTrace();
    But what made me puzzled a lot is if i use OCI driver, it did work great, why??? guys, anybody knows, please give me some tips, thanks in advance.
    regards,
    Kaixuan @ Shanghai

    clarify my question in detail:
    Step 1 : create password file using orapwd command
    Step 2 : create database instance using oradim command
    Step 3 : login using sys as sysdba to startup database, e.g startup nomount pfile='...\initxxx.ora'
    Step 4 : create database.
    java code showing below:
    private static void createEmsdbDatabase(){
    String url = "jdbc:oracle:thin:@localhost:1521:";
    StringBuffer sqlStatement = new StringBuffer();
    sqlStatement.append("create database xxx ");
    sqlStatement.append("maxdatafiles 254 ");
    sqlStatement.append("maxinstances 8 ");
    sqlStatement.append("maxlogfiles 32 ");
    sqlStatement.append("character set UTF8 ");
    sqlStatement.append("national character set UTF8 ");
    sqlStatement.append("DATAFILE 'c:\\oracle\\xxx\\system01.dbf' SIZE 18M REUSE ");
    sqlStatement.append("logfile 'c:\\oracle\\xxx\\redo01.log' SIZE 2M REUSE, ");
    sqlStatement.append("'c:\\oracle\\xxx\\redo02.log' SIZE 2M REUSE, ");
    sqlStatement.append("'c:\\oracle\\xxx\\redo03.log' SIZE 2M REUSE ");
    try {
    DriverManager.registerDriver(new OracleDriver());
    Properties props = new Properties();
    props.put("user", "sys");
    props.put("password", "password");
    props.put("database","xxx");
    props.put("internal_logon", "sysdba");
    Connection conn = DriverManager.getConnection(url, props);
    Statement statement = conn.createStatement();
    statement.executeUpdate(sqlStatement.toString());
    statement.close();
    conn.close();
    } catch (SQLException e) {
    e.printStackTrace();
    issue was met here, when i tried to login as sysdba using sys, and in my java code, i use Thin driver, it then thrus exception, but when OCI driver is used, it works great, i don't know why.
    that is, when i use "jdbc:oracle:oci8:@" as database URL and then properties.put("database","xxx"), it works great. but, when i use "jdbc:oracle:thin:@localhost:1521:" as database URL and then properties.put("database","xxx"), it failed. hopefully, i have clarified my question clearly. thanks.

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

  • Problem with jdbc- Oci8 driver

    Hi there,
    I am using oracle client of version 8.1.5 and jdk1.2.2, classes12.zip in the classpath of my NT.
    I can able to establish the database connectivity using thin driver..
    But for Oci driver, it is not working..
    I have given piece of code below.
    Class.forName
    "oracle.jdbc.driver.OracleDriver");
    Connection conn =
    DriverManager.getConnection ("jdbc:oracle:oci8:@netlink","hris8","hris8");
    netlink is TNSentry in TNSnames.ora
    I am getting Dr.Watson error and which is saying that access violation error..
    null

    Thanks for your reply,
    So i need to install oralce client version
    8.1.6 or 8.1.7; so that i can work out Oci 8 driver with jdk1.2.2 ...
    Is it so?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by don:
    please read the following document
    http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.817/a83724/toc.h tm <HR></BLOCKQUOTE>
    null

Maybe you are looking for

  • IP - Is it possible to call exit planning function from ABAP Report..

    Hi All, Greetings. Is it possible to call exit planning function from ABAP Report (t-code SE38) ? Or I mean is not limited only to be called from ABAP Report, perhaps from BSP / Web-Dynpro / Function Module. If somebody here has been doing it before,

  • Does the Aironet 3600 can be used in France (5ghz) ? What is the PSU voltage ? Hwic module equivalent exist ?

    Hi, Does the power supply from aironet 3600 series, AIR-CAP3602I-A-K9 is compliant with french voltage ? Is it 110-220 input ? How to have a standart french plug or adapter if i bought this item in US ? Does this hardware can be used in France regard

  • Error message when moving or updating contacts

    When i try to move a contact to my contacts in iCloud, I get a message "cannot move the items. Access is denied. Verify the disk is not full or write-protected and that the file is not being used." This just started to happen recently. also, when try

  • Youtube vids do not work?

    Why there are some videos which cant be displyed by apple tv? most of them HD like this one http://www.youtube.com/watch?v=-oCCnxBos10 i cant even see it via iphone ut app whats wrong? thx

  • Distribution function and Sender credits

    I have configured a Distribution By Keys From Sender to Recipient planning function in my BW 3.5 BPS planning environment.  The function distributes the amounts for all cost elements of a given cost center to the cost element S8000000 in a set of rec