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.

Similar Messages

  • Oracle.jdbc.pool.OracleDataSource; local class incompatible

    I want to place a DataSource in a InitialContext with the following code
    public void getEnvironment() throws Exception{ try{ System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); /*System.setProperty(Context.PROVIDER_URL, "t3://127.0.0.1:7001"); System.setProperty(Context.SECURITY_PRINCIPAL, "weblogic"); System.setProperty(Context.SECURITY_CREDENTIALS, "password");*/ InitialContext ic = new InitialContext(); ic.createSubcontext("java:"); ic.createSubcontext("java:/comp"); ic.createSubcontext("java:/comp/env"); ic.createSubcontext("java:/comp/env/jdbc"); // Construcvt Datasource OracleConnectionPoolDataSource ds = new OracleConnectionPoolDataSource(); ds.setURL("jdbc:oracle:thin:@cdcehr29:14985"); ds.setUser("user"); ds.setPassword("pwd"); //Connection conn = ds.getConnection(); ic.bind("java:/comp/env/jdbc/test", ds); System.out.println("see?"); Context envIc = (Context) ic.lookup("java:/comp/env"); envIc.bind("THIS_SERVICE_CD", ""); envIc.bind("THIS_SERVICE_VER", ""); envIc.bind("SERVICE_DATA_SOURCE_JNDI", "jdbc/test"); envIc.bind("ALS_PROJECT_CD", ""); envIc.bind("ALS_SYSTEM_CD", ""); envIc.bind("EHR_CONFIG_DATA_SOURCE_JNDI", ""); envIc.bind("SGR_PATH", ""); envIc.bind("AUDIT_TABLE_NAME", ""); envIc.bind("DEBUG_TABLE_NAME", ""); }catch(NamingException ex){ ex.printStackTrace(); }catch(Exception ex){ ex.printStackTrace(); } }
    but the following error is shown (but not catch in catch block, very strange)
    >
    <Jun 26, 2012 6:17:02 PM CST> <Error> <RJVM> <BEA-000503> <Incoming message header or abbreviation processing failed
    java.io.InvalidClassException: oracle.jdbc.pool.OracleDataSource; local class incompatible: stream classdesc serialVersionUID = 8680830911645568991, local class serialVersionUID = 3349652938965166731
    java.io.InvalidClassException: oracle.jdbc.pool.OracleDataSource; local class incompatible: stream classdesc serialVersionUID = 8680830911645568991, local class serialVersionUID = 3349652938965166731
    at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    Truncated. see log file for complete stacktrace
    >
    what is the problem come from?

    >
    but the following error is shown (but not catch in catch block, very strange)
    >
    <Jun 26, 2012 6:17:02 PM CST> <Error> <RJVM> <BEA-000503> <Incoming message header or abbreviation processing failed
    java.io.InvalidClassException: oracle.jdbc.pool.OracleDataSource; local class incompatible: stream classdesc serialVersionUID = 8680830911645568991, local class serialVersionUID = 3349652938965166731
    java.io.InvalidClassException: oracle.jdbc.pool.OracleDataSource; local class incompatible: stream classdesc serialVersionUID = 8680830911645568991, local class serialVersionUID = 3349652938965166731
    at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    Truncated. see log file for complete stacktrace
    what is the problem come from?
    >
    You didn't post the part of the stacktrace that shows the line number that the problem occured on. (Truncated. see log file for complete stacktrace)
    Are you sure the problem occured in the code you posted? If so did this line execute and print on the console?
    System.out.println("see?");That error can occur when the code used to deserialize an object uses a different version of the class than the version it was serialized with. The code you posted doesn't shown anything that appears to do any deserialization.
    Have their been any changes to the environment lately? Upgrades to Java version, WebLogic or the JDBC driver?

  • 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

  • Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/pool

    I have the following configuration:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    on a Suse 10.1 Linux.
    The javaversion is Java.Version = 1.4.2_11
    The classpath does look like:
    Eisele@brezn:~/FH-Weihenstephan/Winter_Semester_200809/Uebungen> echo $CLASSPATH
    /derby.jar:/derbytools.jar:/derbynet.jar:/derbyclient.jar:/derbyTesting.jar:/local/derby/tools/java/jakarta-oro-2.0.8.jar:/derbyLocale_de_DE.jar:/derbyLocale_es.jar:/derbyLocale_fr.jar:/derbyLocale_it.jar:/derbyLocale_ja_JP.jar:/derbyLocale_ko_KR.jar:/derbyLocale_pt_BR.jar:/derbyLocale_zh_CN.jar:/derbyLocale_zh_TW.jar:/oracle/oracle/product/10.2.0/db_1/jdbc/lib/classes12.jar:/oracle/oracle/product/10.2.0/db_1/jdbc/lib/classes12.zip:/oracle/oracle/product/10.2.0/db_1/jlib/orai18n.jar:/oracle/oracle/product/10.2.0/db_1/jdbc/lib/ojdbc14.jar:/home/Eisele/Oracle/ojdbc14.jar:/home/Eisele/FH-Weihenstephan/Winter_Semester_200809/Uebungen
    Eisele@brezn:~/FH-Weihenstephan/Winter_Semester_200809/Uebungen>
    The Program JDBCVersion.java which I copied out of the Oracle-Documentation looks like:
    import java.sql.*;
    import oracle.jdbc.*;
    import oracle.jdbc.pool.OracleDataSource;
    class JDBCVersion
    public static void main (String args[]) throws SQLException
    System.out.println("Java.Version = " + System.getProperty("java.version")) ;
    OracleDataSource ods = new OracleDataSource();
    ods.setURL("jdbc:oracle:thin:scott/tiger@host:port:service");
    Connection conn = ods.getConnection();
    // Create Oracle DatabaseMetaData object
    DatabaseMetaData meta = conn.getMetaData();
    // gets driver info:
    System.out.println("JDBC driver version is " + meta.getDriverVersion());
    I get the following error
    Eisele@brezn:~/FH-Weihenstephan/Winter_Semester_200809/Uebungen> javac JDBCVersion.java
    Eisele@brezn:~/FH-Weihenstephan/Winter_Semester_200809/Uebungen> java -cp ~/FH-Weihenstephan/Winter_Semester_200809/Uebungen/ JDBCVersion
    Java.Version = 1.4.2_11
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource
    at JDBCVersion.main(JDBCVersion.java:10)
    Eisele@brezn:~/FH-Weihenstephan/Winter_Semester_200809/Uebungen>
    Can anyone help me out here and tell me, what I did wrong ?
    Thanks in advance !
    Rüdiger

    Two thoughts.
    The first is that 10.2.0.1 is unpatched. Why? It has been two years since its release and no one has applied 10.2.0.2, 10.2.0.3 or 10.2.0.4.
    The second is that your question is not a database question but a Java question is you are more likely to get an answer that will help you if you post in a group where it is on-topic.

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

  • Bug in Oracle JDBC thin driver 8.1.6 ?

    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

    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

  • Error message when using "import oracle.jdbc.pool.OracleDataSource;" stmt

    hello Guys I have Written a Servlet program. It contains Some JDBC Code. When I try to import a Package "import oracle.jdbc.pool.OracleDataSource;" It was showing an error message saying that that particuler package does not exist.Could you please tell me what shall I do to import that package?

    Add classes12.jar in your classpath S
    --Balaji S                                                                                                                                                                                                               

  • Bug in Oracle JDBC Drivers with {ts ?}

    Oracle fails to set bind variables correctly when using the {ts ?} in an insert. It works ok if you use {d ?}.
    Ex:
    String st = "INSERT INTO BL(NM,TSTAMP) VALUES (?,{ts ?} )";
    System.out.println(dbConn.nativeSQL(st));
    java.sql.PreparedStatement stmt = dbConnn.prepareStatement(st);
    stmt.setString(1,"test");
    stmt.setString(2,"2000-08-18 09:33:45");
    int xx = stmt.executeUpdate();
    Oracle Reports:
    INSERT INTO BL (NM,TSTAMP) VALUES (:1,TO_DATE (?, 'YYYY-MM-DD HH24:MI:SS'))
    ConnectionPoolManager failed:java.sql.SQLException: ORA-00911: invalid character
    Notice the ? doesn't change to :2.
    Whoops.
    Also when does Oracle plan to implement {fn }
    scalars. There are work arounds but they are not portable. If not soon we will switch our suggested database for our clients.
    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

  • How can I import oracle.jdbc.pool. ???

    where can I find the package oracle.jdbc.pool
    null

    Hi,
    You can find it in [JDEV_HOME]/jdbc/lib/oracle8.1.7/classes12.zip
    Thanks,
    -JDev Team

  • Bug in Oracle JDBC Driver: NullPointerException when calling clearParameters

    There is a bug in the latest version of the JDBC driver that throws a NPE when calling PreparedStatement.clearParameters(). I don't need a response to this, since I have a workaround (just catching and ignoring the exception), but it should probably be fixed. I speculate that the problem only occurs when you try to call clearParameters() more than once on the same PS, but I haven't confirmed it.
    It is probably an easy fix. Following is the stack trace:
    java.lang.NullPointerException
    at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:431)
    at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:3528)
    at oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:3401)
    at com.solarmetric.datasource.PreparedStatementCache$CachePreparedStatement.close(PreparedStatementCache.java:293)
    at com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatementBatch(SQLExecutionManagerImpl.java:666)
    at com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatement(SQLExecutionManagerImpl.java:514)
    at com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLExecutionManagerImpl.java:406)
    at com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionManagerImpl.java:273)
    at com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:421)
    at com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:549)
    at com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:412)
    at com.sun.jdotck.api.persistencemanager.MakePersistentAssignsObjectId.testMakePersistentAssignsObjectId2(Unknown Source)
    at com.sun.jdotck.api.persistencemanager.MakePersistentAssignsObjectId.testMakePersistentAssignsObjectId(Unknown Source)
    at com.sun.jdotck.api.persistencemanager.MakePersistentAssignsObjectId.runTest(Unknown Source)
    at com.sun.jdotck.api.persistencemanager.PersistenceManagerTest.run(Unknown Source)
    at com.solarmetric.kodo.compatibility.JDOCompatabilityTestSuite$1.runTest(JDOCompatabilityTestSuite.java:493)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:325)
    at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:524)
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

    Take a look at the method that is causing the NullPointerException:
    public void clearItem(int i)
    if (!m_dynamic && m_vector == null && i < m_vector.size())
    m_vector.removeElementAt(i);
    if (m_items != null && i >= m_items.length)
    return;
    m_items[i] = null;
    return;
    A NullPointerException will be thrown whenever clearParameters() is called when no parameters have yet been bound.
    The first IF statement should read:
    if (!m_dynamic && m_vector != null && i < m_vector.size())
    A simple workaround would be to make sure that your parameter list is never empty before calling clearParameters(). Is there a patch for this anywhere?

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

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

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

  • Is it a bug for Oracle JDBC driver?

    Hi,
    I use the thin JDBC driver to connect my server, and try to obtain the meta data for the query data set. However, every time I issue 'getMetaData()' to get meta data, the following error is reported:
    java.lang.NumberFormatException: For input string: "4294967295"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
         at java.lang.Integer.parseInt(Integer.java:480)
         at java.lang.Integer.parseInt(Integer.java:518)
         at oracle.jdbc.driver.OracleResultSetMetaData.getPrecision(OracleResultSetMetaData.java:381)
         at genentity.GenEntityForm.getTableMetaData(GenEntityForm.java:445)
         at genentity.GenEntityForm.jButton2_actionPerformed(GenEntityForm.java:336)
    and the program coding for this error is as follows:
    sql = "SELECT * FROM " + tableName;
    ps = conn.prepareStatement(sql);
    rs = ps.executeQuery();
    rsmd = rs.getMetaData(); <-- Error occurs in here.
    Does anyone get an idea for this? Please help.
    Thanks in advance,
    Athens Yan.

    Hi,
    If u have applied the patch then there shud be no problem...try applying the patch again.

  • Bug in oracle jdbc faq

    The faq uses oracle.jdbc.V8Compatibility as a connection property, but the correct is oracle.jdbc.V8Compatible

    Hi Paal,
    Thanks for the feedback, and apologies for the delay responding to you.
    Can you please confirm if this issue relates to the Documentation related faq at http://otn.oracle.com/contact/htdocs/faqs#documentation
    This particular forum relates only to issues with the Online Documentation pages at: http://otn.oracle.com/documentation/index.html
    If your feedback concerns other pages, please try another forum.
    Thanks and regards,
    Les

  • Does oracle.jdbc.pool.OracleDataSource need to be closed.

    In Oracle 10g JDBC, OracleDataSource has a method close. However, I found that many code snippets do not close OracleDataSource. For example, in an Oracle sample code [1], it is not closed. Is that a bug in that sample code?
    [1] http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/RowPrefetchSample/RowPrefetchSample.java.html

    user650949,
    I'm only guessing but I think the important thing is to close the database connection you obtain via the datasource.
    You could decompile the OracleDataSource class and see what the "close()" method actually does.
    Good Luck,
    Avi.

  • Oracle JDBC Pool Configuration problems

    Hi all,
    I'm usin oracle 8.1.6 & thin driver (classes12.zip).
    I've set up correctly a pool in a wl 6.1 windows 2K machine.
    I've copied EXACTLY the configuration values in a wl 6.1 solaris 7 machine and
    doesn't works (it seems wl can't find the listener).
    My cuestions;
    -Why the wl console adds automatically the propertie dll=ocijdbc8 when i'm configuration
    the pool? I don´t want to use the OCI driver!
    -Can this be the problem?
    -Should I place classes12.zip first on the classpath than weblogic.jar?
    TIA.
    Pablo.

    Hi. The issue isn't the zip, it's probably the properties you supply for the pool.
    The oracle driver will try to use the type-2 native libraries if you specify
    a server in the properties.
    Joe
    Pablo wrote:
    Hi all,
    I'm usin oracle 8.1.6 & thin driver (classes12.zip).
    I've set up correctly a pool in a wl 6.1 windows 2K machine.
    I've copied EXACTLY the configuration values in a wl 6.1 solaris 7 machine and
    doesn't works (it seems wl can't find the listener).
    My cuestions;
    -Why the wl console adds automatically the propertie dll=ocijdbc8 when i'm configuration
    the pool? I don´t want to use the OCI driver!
    -Can this be the problem?
    -Should I place classes12.zip first on the classpath than weblogic.jar?
    TIA.
    Pablo.

Maybe you are looking for

  • Unable to start new project in Premiere elements 10

    I have had elements 10 (both photoshop and premiere) downloaded for a while from a multi-pack and have been using photoshop with no problems at all.  Tried to use premiere and start a new project from the welcome screen, but it starts loading, gets t

  • XML Parser for C++ v2 on HP-UX 11.00

    Hi, We are using XML parser for C++ v2(2.0.1) on HP-UX 11.00.Oracle version is 8.0.5. Our application is dumping core .analyzing the core gives pointers to Oracle function calls. We found that some datatypes in parser's oratypes.h (e.g ub4,sb4)were n

  • Books on SAP Event Management

    There are 3 books on SAP Event Management out there: SAP Event Management - SAP's best kept secret... Title: SAP Event Management - SAP's best kept secret ISBN:   978-0-9842350-1-8 Author: Kevin Wilson,  Author Profile: Amazon Publisher: Genie Press,

  • HP OfficeJet Pro 8500 wireless (A909g): no more sharing of card slot?

    Hi there, Before: - in the past (OSX 10.6) my HP OfficeJet Pro 8500 Wireless (model A909g) supported "direct scan to folder" using a SMB folder shared on the Mac and working OK - after 10.7 (or 10.8) Apple changed SMB support disallowing plaintext pa

  • Zen Micro Battery L

    I was just wondering what the longest was that anyone got a battery to last in a zen micro. I have managed to get mine to last approx 4hrs. Has anyone else had this sucess? Blade