Oracle jdbc drivesr

Is there any difference between oralce 8i jdbc drivers and oracle 9i jdbc drivers.

In any case of connectivity failure, a driver's ongoing call to/read from a
DBMS will hang until the OS tells the JVM process that the socket is
dead. Depending on the failure mode, this may be instant, or might
be until the OS's TCP TIMEOUT setting, which is configurable OS-wide,
and typically 10-15 minutes by default. For JDBC Statement calls, try
setting the Statement.setQueryTimeout() value to get control back to
the Java thread sooner. Another route is to have another Java thread that
can monitor hanging JDBC calls, and can then use Oracle's recently-
made-public extensions such as Connection.abort(), which the monitor
thread can call to kill the hanging connection. The reader thread will
then get an exception. All it's JDBC objects must then be replaced
and you will be able to continue running if you can without the DBMS,
and/or try to reconnect.
Joe Weinstein at BEA Systems

Similar Messages

  • How to get comparable Oracle JDBC performance using Java 1.4 vs 1.1.7?

    Our application makes extensive use of JDBC to access an Oracle database. We wrote it a number of years ago using java 1.1.7 and we have been unable to move to new versions of java because of the performance degradation.
    I traced the problem to JDBC calls. I can reproduce the problem using a simple program that simply connects to the database, executes a simple query and then reads the data. The same program running under java 1.4 is about 60% slower than under java 1.1.7. The query is about 80% slower and getting the data is about 150% slower!
    The program is attached below. Note, I run the steps twice as the first time the times are much larger which I attribute to java doing some initializations. So the second set of values I think are more representative of the actual performance in our application where there are numerous accesses to the database. Specifically, I focus on step 4 which is the execute query command and step 5 which is the data retrieval step. The table being read has 4 columns with 170 tuples in it.
    Here are the timings I get when I run this on a Sparc Ultra 5 running
    SunOs 5.8 using an Oracle database running 8.1.7:
                     java 1.1.7  java 1.4
            overall:    2.1s         3.5s
            step 1:     30           200
            step 2:    886          2009
            step 3:      2             2
            step 4:      9            17
            step 5:    122           187
            step 6:      1             1
            step 1:      0             0
            step 2:    203           161
            step 3:      0             1
            step 4:      8            15   <-   87% slower
            step 5:     48           117   <-  143% slower
            step 6:      1             2I find the same poor performance from java versions 1.2 and 1.3.
    I tried using DataDirect's type 4 JDBC driver which gives a little better performance but overall it is still much slower than using java 1.1.7.
    Why do the newer versions of java have such poor performance when using JDBC?
    What can be done so that we can have performance similar to java 1.1.7
    using java 1.4?
    ========================================================================
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    public class test12 {
        public static void main(String args[]) {
            try {
                    long time1 = System.currentTimeMillis();
    /* step 1 */  DriverManager.registerDriver(
                        new oracle.jdbc.driver.OracleDriver());
                    long time2 = System.currentTimeMillis();
    /* step 2 */  Connection conn = DriverManager.getConnection (
                  "jdbc:oracle:thin:@dbserver1:1521:db1","user1","passwd1");
                    long time3 = System.currentTimeMillis();
    /* step 3 */  Statement stmt = conn.createStatement();
                    long time4 = System.currentTimeMillis();
    /* step 4 */  ResultSet rs = stmt.executeQuery("select * from table1");
                    long time5 = System.currentTimeMillis();
    /* step 5 */  while( rs.next() ) {
                      int message_num = rs.getInt(1);
                      String message = rs.getString(2);
                    long time6 = System.currentTimeMillis();
    /* step 6 */  rs.close(); stmt.close();
                    long time7 = System.currentTimeMillis();
                System.out.println("step 1: " + (time2 - time1) );
                System.out.println("step 2: " + (time3 - time2) );
                System.out.println("step 3: " + (time4 - time3) );
                System.out.println("step 4: " + (time5 - time4) );
                System.out.println("step 5: " + (time6 - time5) );
                System.out.println("step 6: " + (time7 - time6) );
                System.out.flush();
            } catch ( Exception e ) {
                System.out.println( "got exception: " + e.getMessage() );
            ... repeat the same 6 steps again...
    }

    If I run my sample program with the -server option, it
    takes a lot longer (6.8s vs 3.5s).Which has to be expected, as the -server option optimizes for long running programs - so it shoudl go with my second suggestion, more below...
    I am not certain what you mean by "just let the jvm
    running". Our users issue a command (in Unix) which
    invokes one of our java programs to access or update
    data in a database. I think what you are suggesting
    would require that I rewrite our application to have a
    java program always running on the users workstation
    and to also rewrite our
    commands (over a hundred) to some how pass data and
    receive data with this new server java program. That
    does not seem a very reasonable just to move to a new
    version of java. Or are you suggesting something
    else?No I was just suggestion what you descript. But if this is not an option, then maybe you should merge your java-programs to C or another native language. Or you could try the IBM-JDK with the -faststart (or similar) option. If thew Unix you mention is AIX, then there would be the option of a resetable-vm. But I cannot say if this VM would solve your problem. Java is definitly not good for applications which only issue some unqiue commands because the hotspot-compiler can not be efficiently used there. You can only try to get 1.1.7 performance by experimenting with vm-parameters (execute java -X).

  • Oracle JDBC driver does not handle Java empty strings correctly

    If you store a Java empty string in a VARCHAR column, then try to retrieve it,
    you get back a null.
    Can someone from Oracle JDBC development
    explain why this is not a bug? An empty
    string is not the same as a null.

    Hello!
    Although all together different, but DATE type also behaves same way.
    inserting createdate = NULL in database returns you blank on select query
    inserting createdate= '' returns null on select. Correct me if i am wrong.
    prity
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Nagaraj Govindaraj ([email protected]):
    If you store a Java empty string in a VARCHAR column, then try to retrieve it,
    you get back a null.
    Can someone from Oracle JDBC development
    explain why this is not a bug? An empty
    string is not the same as a null.<HR></BLOCKQUOTE>
    null

  • A sign Applet unable to load "oracle.jdbc.OracleDriver" class

    hi,
    i am chiranjit , i am now working in a web based ERP. where i am using a signed applet which unable to load "oracle.jdbc.OracleDriver" class but it easily loading "sun.jdbc.odbc.JdbcOdbcDriver", i am also giving my code:
    import java.sql.*;
    import java.math.*;
    import java.io.*;
    import java.awt.*;
    class JdbcTest extends Applet{
    public static void main (String args[]) throws SQLException {
    // Load Oracle driver
    DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
    // Connect to the local database
    Connection conn =
    DriverManager.getConnection
    ("jdbc:oracle:thin:@192.168.16.7:1521:kris",
    "plsql", "oracle");
    // Query the employee names
    Statement stmt = conn.createStatement ();
    ResultSet rset = stmt.executeQuery ("SELECT FIRST_NAME FROM
    AUTHORS");
    // Print the name out
    while (rset.next ())
    System.out.println (rset.getString (1));
    // Close the result set, statement, and the connection
    rset.close();
    stmt.close();
    conn.close();
    }

    Hint: The sun.jdbc.odbc.JdbcOdbcDriver is available in any JRE distribution. The Oracle driver is not.

  • Unable to load oracle.jdbc.driver.OracleDriver class

    i want to connect my java application with oracle database but i m getting an error -"class not found exception oracle.jdbc.driver.OracleDriver " which is written in Class.forName() to register the driver for DriverManager.
    plz help me..

    This is an old class, not included with the JDK anymore. It was made obsolete by
    DataSource which is a connection pool and not a single connection.

  • Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.dr

    Hi
    I am trying to use type 4 driver to connect to my Oracle 9i Rel2 database. I downloaded the odbc14.jar from oracle and added in the C:\Oracle9i\jdbc\lib path. As on the website, I setup my environment:
    Setting Up Your Environment
    On Win95/Win98/NT:
    - Add [ORACLE_HOME]\jdbc\lib\classes111.zip and
    [ORACLE_HOME]\jdbc\lib\nls_charset11.zip to your CLASSPATH.
    (Add classes12.zip and nls_charset12.zip if JDK 1.2.x or 1.3 is
    used. Add ojdbc14.jar and nls_charset12.zip if JDK 1.4 is used.)
    - Make sure [ORACLE_HOME]\bin is in your PATH.
    Still I am getting the following error during runtime:
    Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at jdbc.InsertQueryEx.main(InsertQueryEx.java:11)
    Below is the source code:
    import java.sql.*;
    import java.io.*;
    public class InsertQueryEx {
    public static void main(String[] args)throws Exception{
    Class.forName("oracle.jdbc.OracleDriver");
    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@Prashy:1521:orcl", "scott", "tiger");
    DataInputStream din = new DataInputStream(System.in);
    Statement stmt = con.createStatement();
    while(true){
    try{
    System.out.println("enter emp name");
    String name = din.readLine();
    System.out.println("enter emp no");
    int no = Integer.parseInt(din.readLine());
    System.out.println("enter emp salary");
    float sal = Float.parseFloat(din.readLine());
    System.out.println("enter emp address");
    String addr = din.readLine();
    int count = stmt.executeUpdate("insert into myemp values("+no+",'"+name+"',"+sal+",'"+addr+"')");
    if(count>0)
    System.out.println("Record added");
    else
    System.out.println("Failed");
    catch (Exception e){
    System.err.println("Exception: "+e.getMessage());
    Any help is appreciated
    Thanks
    Prashant

    I am sorry but I did add those in the classpath but still getting this error:
    This is what I have for user variable in classpath:
    .;C:\Oracle9i\jdbc\lib\ojdbc14.jar;C:\Oracle9i\jdbc\lib\nls_charset12.jar
    error is:
    java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at jdbc.InsertQueryEx.main(InsertQueryEx.java:14)
    Thanks

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

  • Error while registering Oracle JDBC Diagnosability MBean

    Hi All,
    I get the following error (pasted at the end)when trying to use the OracleDriver class to create connections.
    I am using JDeveloper11g-11.1.1.2.0, and
    JDeveloper11g-11.1.1.2.0/wlserver_10.3/server/ext/jdbc/oracle/11g/ojdbc6.jar.
    I read other posts with similar errors; the recommendation was to update the jar to the latest patch. But that still does not seem to work.
    Any help/pointers appreciated.
    Thanks
    Meera
    ------------ Error trace ----------------------------------------------------
    SEVERE: Error while registering Oracle JDBC Diagnosability MBean.
    java.security.AccessControlException: access denied (javax.management.MBeanTrustPermission register)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:568)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrustPermission(DefaultMBeanServerInterceptor.java:1824)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:310)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
         at oracle.jdbc.driver.OracleDriver.registerMBeans(OracleDriver.java:345)
         at oracle.jdbc.driver.OracleDriver$1.run(OracleDriver.java:197)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.jdbc.driver.OracleDriver.<clinit>(OracleDriver.java:193)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:169)
         at oracle.communications.brm.pdc.server.transfomation.CrossReferenceDBConnectionObj.initializeConnection(Unknown Source)
         at oracle.communications.brm.pdc.server.transfomation.CrossReferenceHandler.<init>(Unknown Source)
         at oracle.communications.brm.pdc.server.transfomation.RRE_TransformationEngine.createWorkItemProcessors(Unknown Source)
         at oracle.communications.brm.pdc.server.junit.RRE_TransformationEngineTests.testCreateWorkItemProcessors(Unknown Source)
         at oracle.communications.brm.pdc.server.junit.RRE_TransformationEngineTests.testMain(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
         at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
         at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
         at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
         at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
         at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
         at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
         at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
         at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
         at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
         at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
         at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
         at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
         at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
         at org.junit.runners.Suite.runChild(Suite.java:115)
         at org.junit.runners.Suite.runChild(Suite.java:23)
         at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
         at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
         at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
         at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
         at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
         at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
         at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)

    Hi,
    did you enable the permission at the jvm level?
    its' done by adding the following lines to your java.policy file under <JRE_HOME>/lib/security
    grant {
    // JMX Java Management eXtensions
    permission javax.management.MBeanTrustPermission "register";
    ciao,
    Giovanni
    P.S. This solution was taken from http://forums.sun.com/thread.jspa?threadID=491124

  • Error while registering Oracle JDBC Diagnosability MBean - version 1.2.1

    Hi,
    I am running version 1.2.1 of SQL Developer (build MAIN-32.13). I have a local copy of Oracle 11g running on Windows XP. I am running version 1.6.0_03 of java.
    When I fire it up, I get the following message in the "logging page - log" pane:
    Source: oracle.jdbc.driver.OracleDriver
    Message: Error while registering Oracle JDBC Diagnosability MBean.
    Is this something I should worry about?
    Graham

    I got the same thing using SQLDeveloper shipped with 11g. It is every annoying since sqlplusw.exe is not available anymore, neither iSQLPLUS or SQLPLUS.exe is good enough all of the sudden that I found not much choice of accessing the database on windows ...

  • Error while registering Oracle JDBC Diagnosability Mbeans?

    Hi,
    I have installed Oracle 11g 11.1.0.6.0. I am facing problem while executing any command in sql Developer. Below the frame an error message is shown : Error while registering Oracle JDBC Diagnosability Mbeans? and while executing any query like 'select user from dual' error is generated saying connection in busy. I have made connection with system user.so, how to resolve this problem?
    Thanks

    There are a lot of information in listener.log file , some information i am posting .
    Each time i am opening Oracle SQL Developer programme, a error is generated , saying " oracle.jdbc.driver.OracleDriver     Error while registering Oracle JDBC Diagnosability MBean.".
    Though i can create a new connection and query database tables. But why this error message is generated each time i open Oracle SQL Developer?
    06-MAR-2010 20:02:19 * service_update * earth1 * 0
    Sat Mar 06 20:03:10 2010
    06-MAR-2010 20:03:10 * service_update * earth1 * 0
    06-MAR-2010 20:03:19 * service_update * earth1 * 0
    Sat Mar 06 20:03:43 2010
    06-MAR-2010 20:03:43 * service_update * earth1 * 0
    Sat Mar 06 20:04:16 2010
    06-MAR-2010 20:04:16 * service_update * earth1 * 0
    06-MAR-2010 20:04:17 * (CONNECT_DATA=(SID=EARTH1)(CID=(PROGRAM=F:\app\shyam\product\11.1.0\db_1\perl\5.8.3\bin\MSWin32-x86-multi-thread\perl.exe)(HOST=SHYAM-E23629982)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1360)) * establish * EARTH1 * 0
    06-MAR-2010 20:04:19 * service_update * earth1 * 0

  • Oracle JDBC driver 11.2.0.3 is reported as client version 11.2.0.2

    Greetings everyone,
    I wonder if other folks are experiencing the same:
    We have upgraded our JDBC driver to latest ojdbc6.jar (2,714,189 bytes) - 11.2.0.3
    Everything looks great, except that on the server side it is reported as client version 11.2.0.2
    JVM side:
    ===== Database info =====
    DatabaseProductName: Oracle
    DatabaseProductVersion: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    DatabaseMajorVersion: 11
    DatabaseMinorVersion: 2
    ===== Driver info =====
    DriverName: Oracle JDBC driver
    DriverVersion: 11.2.0.3.0
    DriverMajorVersion: 11
    DriverMinorVersion: 2
    Database side:
    select client_driver, client_version from v$session_connect_info
    (null), 11.2.0.2.0
    Is that expected behavior or the property is not updated between releases?
    Andrey
    Edited by: 907164 on Jan 10, 2012 12:09 PM

    Hi ,
    Thank you so much for your reply.
    That was the exact information that I needed.
    Could you also tell me from where can I get the information of future releases.
    Regards,
    Stacey.

  • Oracle JDBC Driver 10.1.0.4.0 and IndexOutOfBounds-Exception

    Hello all,
    we´ve experienced a weird problem using the Oracle JDBC driver version 10.1.0.4.0. While executing SELECT statement we get an ArrayIndexOutOfBounds exception from the JDBC driver. Here´s the stacktrace:
    java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at oracle.jdbc.driver.T4CDateAccessor.saveDataFromOldDefineBuffers(T4CDateAccessor.java:212)
    at oracle.jdbc.driver.T4CPreparedStatement.saveDefineBuffersIfRequired(T4CPreparedStatement.java:405)
    at oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:859)
    at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:949)
    at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:532)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1037)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2905)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2946)
    at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:124)
    We couldn´t find anything on the web on this error. We´re using Weblogic 8.1 SP4 with JDBC version. Does anyone have a hint or an idea what could be the problem here?
    Thanks for any help in advance!
    Cheers,
    Joerg

    I may have a related bug, I get a similiar exception when running JIRA...
    java.lang.ArrayIndexOutOfBoundsException: -1
    at oracle.jdbc.driver.DateTimeCommonAccessor.computeJulianDay(DateTimeCommonAccessor.java:341)
    at oracle.jdbc.driver.DateTimeCommonAccessor.getMillis(DateTimeCommonAccessor.java:386)
    at oracle.jdbc.driver.DateAccessor.getTimestamp(DateAccessor.java:142)
    at oracle.jdbc.driver.OracleResultSetImpl.getTimestamp(OracleResultSetImpl.java:1018)...I tried the 10.1.0.2 and 10.1.0.4 drivers, both throw the same exception. I would try the 10.2 drivers, but they just hang! Gotta love Oracle QA!

  • Oracle JDBC driver 10.1.0.2.0

    Hi All,
    I have installed Oracle 9iR2 on Windows 2000 Advance server, and i am looking for Oracle JDBC driver 10.1.0.2.0 to be installed and configured, it would be real help if some one could send me the download path and how to continue further with installing the JDBC driver
    Thanks,
    Kumar

    You can download the latest JDBC drivers from http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
    You just need to place the jar somewhere and add the location to your classpath.
    Kuassi

  • Bug in Oracle JDBC Pooling Classes - Deadlock

    We are utilizing Oracle's connection caching (drivers 10.2.0.1) and have found a deadlock situation. I reviewed the code for the (drivers 10.2.0.3) and I see the same problem could happen.
    I searched and have not found this problem identified anywhere. Is this something I should post to Oracle in some way (i.e. Metalink?) or is there a better forum to get this resolved?
    We are utilizing an OCI driver with the following setup in the server.xml
    <ResourceParams name="cmf_toolbox">
    <parameter>
    <name>factory</name>
    <value>oracle.jdbc.pool.OracleDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>
    </parameter>
    <parameter>
    <name>user</name>
    <value>hidden</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>hidden</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:oracle:oci:@PTB2</value>
    </parameter>
    <parameter>
    <name>connectionCachingEnabled</name>
    <value>true</value>
    </parameter>
    <parameter>
    <name>connectionCacheProperties</name>
    <value>(InitialLimit=5,MinLimit=15,MaxLimit=75,ConnectionWaitTimeout=30,InactivityTimeout=300,AbandonedConnectionTimeout=300,ValidateConnection=false)</value>
    </parameter>
    </ResourceParams>
    We get a deadlock situation between two threads and the exact steps are this:
    1) thread1 - The OracleImplicitConnectionClassThread class is executing the runAbandonedTimeout method which will lock the OracleImplicitConnectionCache class with a synchronized block. It will then go thru additional steps and finally try to call the LogicalConnection.close method which is already locked by thread2
    2) thread2 - This thread is doing a standard .close() on the Logical Connection and when it does this it obtains a lock on the LogicalConnection class. This thread then goes through additional steps till it gets to a point in the OracleImplicitConnectionCache class where it executes the reusePooledConnection method. This method is synchronized.
    Actual steps that cause deadlock:
    1) thread1 locks OracleImplicitConnectionClass in runAbandonedTimeout method
    2) thread2 locks LogicalConnection class in close function.
    3) thread1 tries to lock the LogicalConnection and is unable to do this, waits for lock
    4) thread2 tries to lock the OracleImplicitConnectionClass and waits for lock.
    ***DEADLOCK***
    Thread Dumps from two threads listed above
    thread1
    Thread Name : Thread-1 State : Deadlock/Waiting on monitor Owns Monitor Lock on 0x30267fe8 Waiting for Monitor Lock on 0x509190d8 Java Stack at oracle.jdbc.driver.LogicalConnection.close(LogicalConnection.java:214) - waiting to lock 0x509190d8> (a oracle.jdbc.driver.LogicalConnection) at oracle.jdbc.pool.OracleImplicitConnectionCache.closeCheckedOutConnection(OracleImplicitConnectionCache.java:1330) at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.runAbandonedTimeout(OracleImplicitConnectionCacheThread.java:261) - locked 0x30267fe8> (a oracle.jdbc.pool.OracleImplicitConnectionCache) at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.run(OracleImplicitConnectionCacheThread.java:81)
    thread2
    Thread Name : http-7320-Processor83 State : Deadlock/Waiting on monitor Owns Monitor Lock on 0x509190d8 Waiting for Monitor Lock on 0x30267fe8 Java Stack at oracle.jdbc.pool.OracleImplicitConnectionCache.reusePooledConnection(OracleImplicitConnectionCache.java:1608) - waiting to lock 0x30267fe8> (a oracle.jdbc.pool.OracleImplicitConnectionCache) at oracle.jdbc.pool.OracleConnectionCacheEventListener.connectionClosed(OracleConnectionCacheEventListener.java:71) - locked 0x34d514f8> (a oracle.jdbc.pool.OracleConnectionCacheEventListener) at oracle.jdbc.pool.OraclePooledConnection.callImplicitCacheListener(OraclePooledConnection.java:544) at oracle.jdbc.pool.OraclePooledConnection.logicalCloseForImplicitConnectionCache(OraclePooledConnection.java:459) at oracle.jdbc.pool.OraclePooledConnection.logicalClose(OraclePooledConnection.java:475) at oracle.jdbc.driver.LogicalConnection.closeInternal(LogicalConnection.java:243) at oracle.jdbc.driver.LogicalConnection.close(LogicalConnection.java:214) - locked 0x509190d8> (a oracle.jdbc.driver.LogicalConnection) at com.schoolspecialty.cmf.yantra.OrderDB.updateOrder(OrderDB.java:2022) at com.schoolspecialty.cmf.yantra.OrderFactoryImpl.saveOrder(OrderFactoryImpl.java:119) at com.schoolspecialty.cmf.yantra.OrderFactoryImpl.saveOrder(OrderFactoryImpl.java:67) at com.schoolspecialty.ecommerce.beans.ECommerceUtil.saveOrder(Unknown Source) at com.schoolspecialty.ecommerce.beans.ECommerceUtil.saveOrder(Unknown Source) at com.schoolspecialty.ecommerce.beans.UpdateCartAction.perform(Unknown Source) at com.schoolspecialty.mvc2.ActionServlet.doPost(ActionServlet.java:112) at com.schoolspecialty.ecommerce.servlets.ECServlet.doPostOrGet(Unknown Source) at com.schoolspecialty.ecommerce.servlets.ECServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.schoolspecialty.ecommerce.servlets.filters.EcommerceURLFilter.doFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)

    We used a documented option to abandon connects in the case of an unforeseen error. The consequence of using this option was not a graceful degradation in performance but a complete lockup of the application. The scenario in which we created a moderate number of abandoned connections was a rare error scenario but a valid test.
    How could this not be a bug in the Oracle driver? Is dead-lock a desireable outcome of using an option? Is dead-lock ever an acceptable consequence of using a feature as documented?
    Turns out other Oracle options to recover from an unexpected error also incur a similar deadlock (TimeToLiveTimeout).
    I did a code review of the decompiled drivers and it clearly shows the issue, confirming the original report of this issue. Perhaps you have evidence to the contrary or better evidence to support your statement "not a bug in Oracle"?
    Perhaps you are one of the very few people who have not experience problems with Oracle drivers? I've been using Oracle since 7.3.4 and it seems that I have always been working around Oracle JDBC driver problems.
    We are using Tomcat with the OracleDataSourceFactory.

  • Bug in Oracle JDBC thin driver (parameter order)

    [ I'd preferably send this to some Oracle support email but I
    can't find any on both www.oracle.com and www.technet.com. ]
    The following program illustrates bug I found in JDBC Oracle thin
    driver.
    * Synopsis:
    The parameters of prepared statement (I tested SELECT's and
    UPDATE's) are bound in the reverse order.
    If one do:
    PreparedStatement p = connection.prepareStatement(
    "SELECT field FROM table WHERE first = ? and second = ?");
    and then bind parameter 1 to "a" and parameter to "b":
    p.setString(1, "a");
    p.setString(2, "b");
    then executing p yields the same results as executing
    SELECT field FROM table WHERE first = "b" and second = "a"
    although it should be equivalent to
    SELECT field FROM table WHERE first = "a" and second = "b"
    The bug is present only in "thin" Oracle JDBC driver. Changing
    driver to "oci8" solves the problem.
    * Version and platform info:
    I detected the bug using Oracle 8.0.5 server for Linux.
    According to $ORACLE_HOME/jdbc/README.doc that is
    Oracle JDBC Drivers release 8.0.5.0.0 (Production Release)
    * The program below:
    The program below illustrates the bug by creating dummy two
    column table, inserting the row into it and then selecting
    the contents using prepared statement. Those operations
    are performed on both good (oci8) and bad (thin) connections,
    the results can be compared.
    You may need to change SID, listener port and account data
    in getConnecton calls.
    Sample program output:
    $ javac ShowBug.java; java ShowBug
    Output for both connections should be the same
    --------------- thin Driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    [ The same - with buggy reversed order (should give no answers):
    aaa
    --------------- oci8 driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    aaa
    [ The same - with buggy reversed order (should give no answers):
    --------------- The end ---------------
    * The program itself
    import java.sql.*;
    class ShowBug
    public static void main (String args [])
    throws SQLException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    System.out.println("Output for both connections should be the
    same");
    Connection buggyConnection
    = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:ORACLE",
    "scott", "tiger");
    process("thin Driver", buggyConnection);
    Connection goodConnection
    = DriverManager.getConnection ("jdbc:oracle:oci8:",
    "scott", "tiger");
    process("oci8 driver", goodConnection);
    System.out.println("--------------- The end ---------------");
    public static void process(String title, Connection conn)
    throws SQLException
    System.out.println("--------------- " + title + "
    Statement stmt = conn.createStatement ();
    stmt.execute(
    "CREATE TABLE bug (id VARCHAR(10), val VARCHAR(10))");
    stmt.executeUpdate(
    "INSERT INTO bug VALUES('aaa', 'bbb')");
    System.out.println("[ Non parametrized query: ]");
    ResultSet rset = stmt.executeQuery(
    "select id from bug where id = 'aaa' and val = 'bbb'");
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - parametrized (should give one
    row): ]");
    PreparedStatement prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "aaa");
    prep.setString(2, "bbb");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - with buggy reversed order
    (should give no answers): ]");
    prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "bbb");
    prep.setString(2, "aaa");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    stmt.execute("DROP TABLE bug");
    null

    Horea
    In the ejb-jar.xml, in the method a cursor is closed, set <trans-attribute>
    to "Never".
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name></ejb-name>
    <method-name></method-name>
    </method>
    <trans-attribute>Never</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    Deepak
    Horea Raducan wrote:
    Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
    prevent it from closing the open cursors ?
    Thank you,
    Horea

Maybe you are looking for

  • I have uninstalled Java  - how do I get it back?

    Hi, I uninstalled Java & Adobe FLash - just as a precaution - did a scan and check and clean up of my Mac, now how do I get those two applications back? And ensure they are clean? Thanks Tracy

  • Check printing report

    Hi, EBS R12.1 OEL 5.4 Is there a standard or sample check printing report in EBS, that we can use as template? Thanks a lot Ms K

  • ISE Guest Account Lockout

    Hi, I would like to disable account lockout for ISE Guest accounts resulting from login failures. In the ISE, there is a setting for Maximum Number of Login Attempts (with values from 1-9) in:         Administration>Guest Management>Settings>Guest>P

  • Error while refreshing the XI runtime cache

    Hello All,    Here is what happened. After PI7.0 install with client 001, I did the BPM scenario and it worked. After the performing the client copy the BPM stopped working with the new client. I did the client copy per note 940309. The file is getti

  • StreamCorruptedException invalid type code: 01

    ok here's the deal. this is another one of those "help me, objectinput/outputstream sucks" anyways, i'm making a program which will play a board game between two computers over a ServerSocket network and I'm using a dataTransfer class to hold any cha