Database.close not closing database?

I've a singleton holding onto open (read-only) database handles, the environment and catalog DB handles. I'm using a StoredMap.get() to pull specific data items by their keys. Everything works fine, except in my JVM shutdown hook.
The shutdown hook iterates over each of my open database handles and calls db.close() on them. Same goes for catalog DB and the environment.
However, when the shutdown hook code gets to environment.close, it throws a DatabaseException saying - 1 database still open in environment.
I've tried explicitly deallocating the reference to the database handle before calling db.close(). That doesn't help.
Any ideas on what might cause a db.close to execute (no exceptions thrown), but the corresponding environment.close still thinks the database is not yet closed?
I'm wondering if there is a timing aspect here, since the db.close and env.close are called in very rapid succession inside the shutdown hook code.
Thanks

Hi,
Any ideas on what might cause a db.close to execute
(no exceptions thrown), but the corresponding
environment.close still thinks the database is not
yet closed?
I'm wondering if there is a timing aspect here, since
the db.close and env.close are called in very rapid
succession inside the shutdown hook code.Calling them in succession should not be a problem. Is it possible that you've opened a database more than once? You have to close each "handle' you've opened if you open a database multiple times.
Mark

Similar Messages

  • Statement.close() Not closing the Result set

    Hi all,
    I have the following code which invokes a procedure in Oracle database
    public static callProcedure(Connection connection,String procedure){
    ResultSet resultSet = null;
    CallableStatement callableStatement = null;
    try {
    callableStatement = connection.prepareCall(procedure);
    callableStatement.registerOutParameter(1,OracleTypes.CURSOR);
    callableStatement.execute();
    resultSet =((OracleCallableStatement)callableStatement).getCursor(1);
    } catch (Exception exception) {
    exception.printStackTrace();
    } finally {
    try {
    callableStatement.close();
    } catch (SQLException sqlException) {
    sqlException.printStackTrace()
    return resultSet;
    Ideally if i try to iterate through the result set which is returned then it should give me resultset closed as i am closing the resultset. But this is not happening.
    Please anybody can explain the isue

    Hi,
    That is not easy to explain, I might take a guess and say that a statement cache is being used therefore the statement is not actually being closed.
    I always close the reultset then the statement so wouldn't notice this behaviour.
    Why are you returning a resultset anyway? If you really need to do this I would suggest using a disconnected resultset:
    OracleCachedRowSet ocrs = new OracleCachedRowSet();
    ocrs.populate(resultSet);
    return ocrs;

  • Database Connections Not Closing

    I'm using iBatis for PostgreSQL database access and frequently have problems with connections not being closed. Here is a copy of my sqlMapConfig file:
    ============================
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE sqlMapConfig
    PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
    "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
    <sqlMapConfig>
    <properties resource="ibatis.properties" />
    <settings
    lazyLoadingEnabled="true"
    cacheModelsEnabled="true"
    enhancementEnabled="false"
    useStatementNamespaces="false"
    />
    <transactionManager type="JDBC" commitRequired="true">
    <dataSource type="DBCP">
    <property name="driverClassName" value="${driver}" />
    <property name="url" value="${url}" />
    <property name="username" value="${username}" />
    <property name="password" value="${password}" />
    <property name="maxActive" value="10"/>
    <property name="maxIdle" value="5"/>
    <property name="maxWait" value="5000"/>
    <property name="logAbandoned" value="true"/>
    <property name="removeAbandoned" value="true"/>
    <property name="removeAbandonedTimeout" value="1"/>
    <property name="Driver.logUnclosedConnections" value="true"/>
    </dataSource>
    </transactionManager>
    <sqlMap resource="job-sqlMap.xml" />
    </sqlMapConfig>
    ============================
    Due to the logAbandoned and removeAbandoned settings, I get a report in my log file whenever there is a connection that was not properly closed. Here is one of those log entries:
    23:22:51.483 (10) Finalizing a Connection that was never closed:
    java.lang.Throwable: Connection was created at this point:
    at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:175)
    at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
    at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
    at org.postgresql.Driver.makeConnection(Driver.java:393)
    at org.postgresql.Driver.connect(Driver.java:267)
    at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
    at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
    at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
    at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
    at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
    at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
    at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
    at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
    at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
    at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
    at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
    at edu.calpoly.lib.multimedia.big.db.AutomaticPeriodUpdateIBatisImplDBHandler.getGamesWithAutomaticUpdatePolicy(AutomaticPeriodUpdateIBatisImplDBHandler.java:154)
    at edu.calpoly.lib.multimedia.big.game.AutoUpdateThread.run(AutoUpdateThread.java:155)
    The file: AutomaticPeriodUpdateIBatisImplDBHandler.java contains an iBatis call on line # 154:
    --> list = sqlMap.queryForList("getGamesWithAutoPolicy", null);
    from the map file:
    <select id="getGamesWithAutoPolicy" resultClass="java.util.HashMap">
    <![CDATA[
    SELECT gameid, policy
    FROM update_policy
    ]]>
    </select>
    Here is the code for the entire method that uses this transaction:
    ============================
    public List getGamesWithAutomaticUpdatePolicy() throws BIGDatabaseFacadeException
    List list = new ArrayList();
    try
    sqlMap.startTransaction();
    list = sqlMap.queryForList("getGamesWithAutoPolicy", null);
    sqlMap.commitTransaction();
    catch(SQLException sqle)
    throw new BIGDatabaseFacadeException(sqle);
    finally
    try
    sqlMap.endTransaction();
    catch(SQLException sqle)
    throw new BIGDatabaseFacadeException(sqle);
    return list;
    ============================
    I know that this should be handled as an automatic transaction, but I tried adding the start, commit and end transaction commands in my desperate attempt to fix this problem (but it still didn't help).
    Here is my code for creation of sqlMap -
    --> sqlMap = SqlMapClientBuilder.buildSqlMapClient(Resources.getResourceAsReader("sqlMaps.xml"));
    Except for the fact that occasionally connections are not closed, overall my database access using iBatis works very well.
    In the course of trying to fix this problem I've worked to update all my lib files to the latest versions, and here is current status:
    My iBatis lib file: ibatis-2.3.4.726.jar
    My JDBC driver: postgresql-8.4-701.jdbc3.jar
    Required commons files:
    commons-dbcp-1.2.2.jar
    commons-pool-1.5.3.jar
    Note that I tried adding --> commitRequired="true" to the transactionManager in sqlMaps.xml, hoping it might help, but no joy.
    Please help me figure out why my database connections often do not close. Thank you very much!

    I'm sorry, but I don't understand what you mean by "close the session." I believe iBatis is supposed to take care of all that automatically. My understanding is that all the user does is create the sqlMapClient and then use it along with various map files to query and update the database. iBatis does the rest.

  • Connection not closed in the database server end

    Hi,
    Our database server (sql server 2000) and java application are running in two different boxes. Because the java application sent to the db server quite a few queries that can not be completed (applications hangs there) due to huge amount of data (18 million records in one table and 1 million records in another table and there are joins among the three tables), we stopped the java program. However, in the db server end, the connections associated with these problem queries were not closed although the java app end already closed these connections by calling connection.close(). When this happened, we have to manually close the connection from sql server enterprise manager.
    Here are the questions.
    1)what could be the reason why db server does not close the connection?
    2)Is there any solution in the java end that could close the connection in the db server end when this situation happens? I say this situation happens, I mean in most cases when java application closes connection, db server closes connections in its end too.
    Thanks
    Mark

    mark.lin wrote:
    Thanks for your answers and questions.
    Here are the answers to your questions
    1)The jdbc driver is jturboJTurbo? Never heard of it. You mean this?
    http://www.newatlanta.com/products/jturbo/index.jsp
    Why pay for something when you have two options available that are free? One of them is from Microsoft itself. Whose idea was this?
    2)It's a desk top application.
    It seems to me that it should not be driver issue. I was this happened the Microsoft's own jdbc driver. By jdbc specification, although you don't close the connection explicitly in the program, the connection will be automatically closed in the java app end during garbage collection. Very bad - never depend on this. Always close your ResultSet, Statement, and Connection in reverse order of opening in a finally block, each one wrapped in individual try/catch blocks.
    One should never, ever depend on the GC to take care of resources like database connections or resource handles. Those should be cleaned up by your code.
    I tested this by intentionally not closing a connection. When I stops the application, the connection in the sql server end was also closed.
    But if you don't close the application and fail to close connections, you can see where eventually you'll exhaust the pool.
    It seems to me this is a sql server issue rather than a jdbc driver issue. I need way to prove this.
    Like I suggested, it's easy to swap in the jTDS driver and try it again. What do you have to lose?
    Or call Microsoft support and ask them. Or maybe JTurbo. You're paying for it - might as well use the support.
    %

  • Database connection not closing on time out

    Hi All,
    Not sure if this is the right place for this question but..
    I've moved my app (built using jdev10.1.2., adf bc's and jsp's) to an app server. For some reason, the database connection is not closing. I have 46 connections to the database and I''m the only one with the URL, not good.
    So can anyone shed any light on this? I thought it should disconnect after a time out but its not.
    Any ideas would be gratfully received.
    Thanks in advance

    or try this one..
    Go to the bottom of the tutorial, you will find the configuration...
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bc9baf90-0201-0010-479a-b49b25598ebf

  • Firefox.exe*32 not closing down when i sutdown all open windows so I have to close it through taskmanager

    firefox.exe*32 not closing down when i sutdown all open windows so I have to close it through taskmanager so I can then start a new session.

    See:
    *"Hang at exit": http://kb.mozillazine.org/Firefox_hangs
    *"Firefox hangs when you quit it": https://support.mozilla.org/kb/Firefox+hangs

  • JMS session is not closed even after calling close()

    Hi All,
    I am using JMS to receive and publish topics for a process,in my java code i
    am creating new JMS Session on demand(ie., whenever a new topic is
    received) after processing the topic i am closing the session with close(),but
    still the session is not closed.In a period of time more sessions are created
    and FD leaks occurs which stops the process functionality.
    Later i moved the on demand session code to a static block, its working fine
    and no FD leak occurs.
    Is this a known behavior or any java bug is there to point this issue,please
    help me regarding this.
    Thanks,
    Ants Balajei

    You should try avoid creating sessions on demand but cache/pool them...
    http://activemq.apache.org/how-do-i-use-jms-efficiently.html
    James
    http://www.iona.com/
    Open Source the Enterprise Way

  • I keep getting a message that Firefox is open and not responding. That I have to close the Firefox application or restart my computer. A real pain. Why is the firefox application not closing in English

    I keep getting a message that Firefox is open and not responding. That I have to close the Firefox application or restart my computer. A real pain. Why is the firefox application not closing.

    Sounds like Firefox is "hanging at exit". That problem is frequently caused by an Extension or a Plugin. Read all of the following articles.<br /><br />
    NOTE: Establish a habit of exiting/closing Firefox with Firefox button > Exit or File > Exit to allow an orderly shutdown of Firefox and closing of all of the files that Firefox has open.
    #Stop the Firefox process:
    #*[http://kb.mozillazine.org/Kill_application Mozillazine - Kill application]
    #*Windows 7 users click [http://www.techrepublic.com/blog/window-on-windows/reap-the-benefits-of-windows-7s-task-manager/2576 here]
    #*Mac users: http://techheavy.com/2011/02/the-mac-task-manager/
    #Why Firefox may hang:
    #*[http://support.mozilla.org/en-US/kb/Firefox+hangs Firefox hangs] (see Hang at exit)
    #*[http://kb.mozillazine.org/Firefox_hangs Firefox hangs (Mozillazine)] (see Hang at exit and Closing Firefox properly)
    #*[https://support.mozilla.org/en-US/kb/Firefox+is+already+running+but+is+not+responding Firefox is already running but is not responding]
    #Use Firefox Safe Mode to find a problem with an Extension or Plugin:
    #*Don't check anything when entering Safe Mode, just continue
    #*If the problem does not occur in Safe Mode it is probably an Extension or Plugin causing the problem
    #*See:
    #**[[Safe Mode]] and [http://kb.mozillazine.org/Safe_Mode Safe Mode (Mozillazine)]
    #**[http://support.mozilla.org/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    #**[http://support.mozilla.org/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    #**[http://support.mozilla.org/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *'''''Shockwave Flash''''' (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *'''''Next Generation Java Plug-in for Mozilla browsers''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • DriverManagerConnectionPoolConnection not closed, check your code!

    DriverManagerConnectionPoolConnection not closed, check your code!
    I keep getting these, both from custom jdbc calls (finally {close res, stmt, con} ALWAYS) as well as on CMP entity beans.... Not always, but periodicly! ... Running OC4J9.0.4.0.1 ...
    Suggestions ???

    Sorry Steven Button
    I did not mean to offend any one, but don't you go through some frustrating moments when you feel you have tried all possible combinations and u need help from other techies and they do not respond, Once again I am sorry if I have offended anybody.
    Here is my hardware/software in production
    1) IBM AIX
    2) Standalone OC4J 9.0.4.0.0
    3) JDK 1.4.2_07
    4) Database 10.1.0.2.0
    I have also set the following debug flags for the JVM,
    -Djdbc.connection.debug=true and
    -Ddatasource.verbose=true
    Yesterday one interesting thing happened
    For some reason our database server connection from application server went down for a few minutes.
    After the network connection was restored, in the admin console for OC4J I see more logical connections (Open JDBC Connections count(6) is more than initial pool size(5)).
    When I saw the log file I see the same "Check your code" message. But one more interesting thing got logged thanks to "-Ddatasource.verbose=true", this flag will log the pool size of the connection pool in the application log file.
    The number that got logged was the correct number of pool size(which is 5).
    Example
    My initial pool size was "5", the admin console showed the pool size after network failure as "6", which is wrong.
    But the -Ddatasource.verbose=true logged the pool size as "5" which is correct.
    Can anyone help me with respect to that?
    Message for Avi Abrami
    Here is the sample finally block we use through out the application code.
    try {
    } catch (Exception ex) {
    // we log the error in the application log file.
    } finally {
    try
    if (lobj_resultset != null)
    lobj_resultset.close();
    lobj_resultset = null;
    } catch (Exception exrs)
    try
    if (lobj_stmt != null)
    lobj_stmt.close();
    lobj_stmt = null;
    } catch (Exception exstmt)
    try
    if (lobj_conn != null)
    lobj_conn.close();
    lobj_conn = null;
    } catch (Exception exconn)
    As you can see the main catch block will log the appropriate errors encountered in the try block. Thanks for your suggestion, I will give it a try by not ignoring the catch block exceptions in the finally block.
    There is one more think,
    it is my understanding that if an 'Error' is raised like OutOfMemoryError rather than an Exception
    like 'SQLException' then that will not get caught since I am using catch (Exception ex) and not catch (Throwable throw).
    But even if I do not catch an 'Error', it is my belief that the finally block will still get executed.
    So say the try block for some reason raises an OutOfMemoryError , since in my code I use catch (Exception ex), my code execution will go to finally block and not the catch block, that still should release the connection back to the pool should it not?.
    Any help / advise is appreciated.
    I have also raised a TAR with oracle and will keep this forum posted with what happens with that.
    But, guys I really need help, suggestions, directions from u all.

  • Cursors are not closed when using Ref Cursor Query in a report  ORA-01000

    Dear Experts
    Oracel database 11g,
    developer suite 10.1.2.0.2,
    application server 10.1.2.0.2,
    Windows xp platform
    For a long time, I'm hitting ORA-01000
    I have a 2 group report (master and detail) using Ref Cusor query, when this report is run, I found that it opens several cursors (should be only one cursor) for the detail query although it should not, I found that the number of these cursors is equal to the number of master records.
    Moreover, after the report is finished, these cursors are not closed, and they are increasing cumulatively each time I run the report, and finally the maximum number of open cursors is exceeded, and thus I get ORA-01000.
    I increased the open cursors parameter for the database to an unbeleivable value 30000, but of course it will be exceeded during the session because the cursors are increasing cumulatively.
    I Found that this problem is solved when using only one master Ref Cursor Query and create a breake group, the problem is solved also if we use SQL Query instead of Ref Query for the master and detail queries, but for some considerations, I should not use neither breake group nor SQL Query, I have to use REF Cursor queries.
    Is this an oracle bug , and how can I overcome ?
    Thanks
    Edited by: Mostafa Abolaynain on May 6, 2012 9:58 AM

    Thank you Inol for your answer, However
    Ref Cursor give me felxibility to control the query, for example see the following query :
    function QR_1RefCurDS return DEF_CURSORS.JOURHEAD_REFCUR is
    temp_JOURHEAD DEF_CURSORS.JOURHEAD_refcur;
              v_from_date DATE;
              v_to_date DATE;
              V_SERIAL_TYPE number;
    begin
    SELECT SERIAL_TYPE INTO V_SERIAL_TYPE
    FROM ACC_VOUCHER_TYPES
    where voucher_type='J'
    and IDENT_NO=:IDENT
    AND COMP_NO=TO_NUMBER(:COMPANY_NO);
         IF :no_date=1 then
                   IF V_SERIAL_TYPE =1 THEN     
                   open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
                   FROM JOURHEAD
                   WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
                   AND IDENT=:IDENT
              AND ((TO_NUMBER(VOCH_NO)=:FROM_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NULL)
              OR (TO_NUMBER(VOCH_NO) BETWEEN :FROM_NO AND :TO_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NOT NULL )
              OR (TO_NUMBER(VOCH_NO)<=:TO_NO and :FROM_NO IS NULL AND :TO_NO IS NOT NULL )
              OR (:FROM_NO IS NULL AND :TO_NO IS NULL ))
                   ORDER BY TO_NUMBER(VOCH_NO);
                   ELSE
                   open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
                   FROM JOURHEAD
                   WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
                   AND IDENT=:IDENT               
              AND ((VOCH_NO=:FROM_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NULL)
              OR (VOCH_NO BETWEEN :FROM_NO AND :TO_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NOT NULL )
              OR (VOCH_NO<=:TO_NO and :FROM_NO IS NULL AND :TO_NO IS NOT NULL )
              OR (:FROM_NO IS NULL AND :TO_NO IS NULL ))     
                   ORDER BY VOCH_NO;          
                   END IF;
         ELSE
                   v_from_date:=to_DATE(:from_date);
                   v_to_date:=to_DATE(:to_date);                         
              IF V_SERIAL_TYPE =1 THEN
                   open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
                   FROM JOURHEAD
                   WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
              AND IDENT=:IDENT                         
                   AND ((voch_date between v_from_date and v_to_date and :from_date is not null and :to_date is not null)
                   OR (voch_date <= v_to_date and :from_date is null and :to_date is not null)
                   OR (voch_date = v_from_date and :from_date is not null and :to_date is null)
                   OR (:from_date is null and :to_date is null ))     
                   ORDER BY VOCH_DATE,TO_NUMBER(VOCH_NO);     
              ELSE
                   open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
                   FROM JOURHEAD
                   WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
                   AND IDENT=:IDENT                         
              AND ((voch_date between v_from_date and v_to_date and :from_date is not null and :to_date is not null)
                   OR (voch_date <= v_to_date and :from_date is null and :to_date is not null)
                   OR (voch_date = v_from_date and :from_date is not null and :to_date is null)
                   OR (:from_date is null and :to_date is null ))     
                   ORDER BY VOCH_DATE,VOCH_NO;          
              END IF;
         END IF;               
         return temp_JOURHEAD;
    end;

  • TopLink logical connection not closed

    Hi everybody,
    I have a problem when using db adapter for polling databases tables. This is using TopLink to access database's data.
    My process was running w/o errors till I have started to use external data source defined in OAS.
    My oc4j-ra.xml file contains:
    ============================================================
         <connector-factory location="eis/DB/TestData" connector-name="Database Adapter">
              <config-property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
              <config-property name="connectionString" value=""/>
              <config-property name="userName" value=""/>
              <config-property name="password" value=""/>
              <config-property name="minConnections" value="5"/>
              <config-property name="maxConnections" value="5"/>
              <config-property name="minReadConnections" value="1"/>
              <config-property name="maxReadConnections" value="1"/>
              <config-property name="usesExternalConnectionPooling" value="true"/>
              <config-property name="dataSourceName" value="jdbc/TESTDS"/>
              <config-property name="usesExternalTransactionController" value="true"/>
              <config-property name="platformClassName" value="oracle.toplink.internal.databaseaccess.Oracle9Platform"/>
              <config-property name="usesNativeSequencing" value="true"/>
              <config-property name="sequencePreallocationSize" value="50"/>
              <config-property name="tableQualifier" value=""/>
              <config-property name="defaultNChar" value="false"/>
              <config-property name="usesBatchWriting" value="true"/>
         </connector-factory>
    ============================================================
    Once I have switched to this oc4j-ra.xml configuration file I got the following error in files logs (using the -Djdbc.connection.debug=true flag)
    ============================================================
    06/09/25 11:40:46 OrionCMTConnection not closed, check your code!
    06/09/25 11:40:46 Logical connection not closed, check your code!
    06/09/25 11:40:46 Created at:
    06/09/25 11:40:46 java.lang.Throwable: OrionCMTConnection created
    06/09/25 11:40:46      at com.evermind.sql.OrionCMTConnection.<init>(OrionCMTConnection.java:121)
    06/09/25 11:40:46      at com.evermind.sql.OrionCMTConnectionFinalize.<init>(OrionCMTConnectionFinalize.java:42)
    06/09/25 11:40:46      at com.evermind.util.ClassOptimizerFactory.getOrionCMTConnection(ClassOptimizerFactory.java:80)
    06/09/25 11:40:46      at com.evermind.sql.OrionCMTDataSource.getConnection(OrionCMTDataSource.java:237)
    06/09/25 11:40:46      at com.evermind.sql.OrionCMTDataSource.getConnection(OrionCMTDataSource.java:227)
    06/09/25 11:40:46      at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:102)
    06/09/25 11:40:46      at oracle.toplink.sessions.DatabaseLogin.connect(DatabaseLogin.java:218)
    06/09/25 11:40:46      at oracle.toplink.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1323)
    06/09/25 11:40:46      at oracle.toplink.internal.databaseaccess.DatabaseAccessor.incrementCallCount(DatabaseAccessor.java:1198)
    06/09/25 11:40:46      at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:633)
    06/09/25 11:40:46      at oracle.toplink.publicinterface.Session.executeCall(Session.java:793)
    06/09/25 11:40:46      at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:131)
    06/09/25 11:40:46      at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:115)
    06/09/25 11:40:46      at oracle.toplink.internal.queryframework.CallQueryMechanism.executeSelectCall(CallQueryMechanism.java:194)
    06/09/25 11:40:46      at oracle.toplink.internal.queryframework.CallQueryMechanism.selectAllRows(CallQueryMechanism.java:565)
    06/09/25 11:40:46      at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:733)
    06/09/25 11:40:46      at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:708)
    06/09/25 11:40:46      at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:447)
    06/09/25 11:40:46      at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:493)
    06/09/25 11:40:46      at oracle.toplink.queryframework.ReadQuery.execute(ReadQuery.java:125)
    06/09/25 11:40:46      at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1958)
    06/09/25 11:40:46      at oracle.toplink.threetier.ClientSession.internalExecuteQuery(ClientSession.java:390)
    06/09/25 11:40:46      at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
    06/09/25 11:40:46      at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1038)
    06/09/25 11:40:46      at oracle.toplink.publicinterface.Session.executeQuery(Session.java:876)
    06/09/25 11:40:46      at oracle.tip.adapter.db.inbound.DestructivePollingStrategy.poll(DestructivePollingStrategy.java:211)
    06/09/25 11:40:46      at oracle.tip.adapter.db.InboundWork.runOnce(InboundWork.java:247)
    06/09/25 11:40:46      at oracle.tip.adapter.db.InboundWork.run(InboundWork.java:213)
    06/09/25 11:40:46      at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
    06/09/25 11:40:46      at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:267)
    06/09/25 11:40:46      at java.lang.Thread.run(Thread.java:534)
    ============================================================
    Any clue on this?
    Thankfully,
    amo

    Thanks Marc,
    I have finally noticed that was not related with some TopLink error.
    So, is there any other way to refer in the DBAdapter to an OAS datasource?
    Regards,
    amo

  • SAP Production Order not closing

    Hi there,
    I am running the COHV with Complete parameter in the background, and it does pick up several TECO orders from the past, like say from 2009 which are not closed but it does not process them to CLSD status.
    I am seeing some entries in COHV, CO1P, COFC transactions - I picked a few randomly to check.
    The order qty is not always equal to the delivered qty - Again a random test
    The consumption qty on the components is not always equal to the required qty, which leaves reservation open - random check
    Is all the above causing my order not to close ? where do I see the error log, when I try to close the order. I wrote the above issues based on my random check.
    Thank you

    Hi SAP Process,
    When you run COHV to close the orders, you can see the log with the list of orders that have not been closed.
    To see in detail what has happened you will need to check order by order.
    Other option will we to evaluate each situation separatelly. You can check COGI, CO1P, see open reservations, check if you have TR or TO if you use WM, etc.. Once each situation is cleaned, you will be able to closed most of your production orders. It is quite common to create a custom report to make all these checks (COGI, TR/TOs, etc) and closed the orders.
    Kind Regards,
    Mariano

  • Hyperlinks not closing out in RH

    Here's another odd behavior:
    When I bring my FM book into RH, my hyperlinks are not closed
    out in the converted content in RH. In FM, the hyperlinks are
    correctly inserted using the gotolink and newlink Hypertext
    markers. Yet in RH, the rest of the sentence in which the hyperlink
    appears is also erroneously tagged as part of the hyperlink.
    Is this is a bug? Has anyone else seen this behavior and if
    so, how did you fix it?

    Hello Michael,
    This is not an issue, you'd always get the hyperlinks
    appearing corrcetly without any tagging in the Design view of RH.
    Just try to close and reopen the topic in the Design view or try to
    view it in preview - it shoudl appear correctly.
    Regards,
    Pooja

  • AS Java sessions are not closed until they time out

    Hello Experts,
    we have a SAP PI system to integrate SAP R/3 with external applications and recently we are facing a problem with inactive sessions. There's a new application we are setting up that consumes a webservice published by this SAP PI system. The scenario is SOAP --> PI --> PROXY. What we have noticed is that when the application sends loads of requests sometimes the system fails. This is because we are reaching the maximum number of open sessions in AS Java (1000). Investigating a bit more we found out that the sessions are not "closed" once the communication between the application and SAP PI has finished. Those sessions are open until they are automatically timed-out by the system after 1800 sec.
    We have found the notes below in SAPNet:
    Note 1363751 - ICM: Java Web sessions are not terminated
    Note 1307940 - New HTTP session opened for every web service call
    However, none of them are applicable to our system because it is more updated:
    SAP PI 7.1 EHP1 SP002
    Kernel Patch Level: 87
    We have tried to close connections from the application that consumes the webservice but with no success. The sessions remain in the server until they are timed-out. Could you please tell us if this is the normal behavior of an AS Java system? Is this the way it should work? If so, can you tell us how to decrease this timeout so the inactive sessions are cleaned faster? We tried to find it but we didn't manage. Is there any way to close the session once the communication has finished?
    Thank you in advance.
    Roger Allué i Vall

    Hi Roger,
    You can do the following things to help solving your issue:
    1. Decrease session timeout default value of the web container: Use the NetWeaver Administrator
    Open Application Modules plugin within NWA
    Configuration Management -> Infrastructure -> Application Modules
    Set the desired timeout web module you are using, in minutes.
    The default value 0 in the NWA means that the value is not modified
    and the default value of 30 minutes timeout will be used.
    2. Increase the max. no. of Sessions in Configtool
    The max. number of Sessions can be set in Configtool in the Expert
    mode. There is no limitation for the parameter.
    Thanks,
    Anderson

  • Outlook 2013 are not opening and showing pst files are not closed properly

    Hi
    Outlook 2007 has stopped working and showing close the program. Again,we re-started then outlook 2007 and it has opened and taken the backup of pst files in a separate hard drive.
    The pst file was repaired in scanpst.exe and again i have tried to put the pst file back in outlook 2007.It was hanging and suddenly i have uninstalled 2007 and started installing outlook 2013.
    2013 applications like word,excel,power point are opening and outlook 2013 are not able to open and showing pst files were not closed properly.
    Again i have un-installed and re-installed the outlook 2013.still we are not able to open the outlook.
    Need your support at the earliest to fix the issue.
    Thanks

    Hi,
    What's the .pst file used for? Archive? Or you set up a POP3 account and want to import the emails from the .pst file?
    Another question, you mentioned you installed Outlook 2013 and it didn't open either. Was this from the beginning right after you installed Outlook 2013, or after you did something such as create a new Profile, set up a new account and tried to import the
    .pst file?
    Kindly answer my questions so I can understand the situation better.
    I've seen some of this issue caused by the anti-malware software, check your anti-malware software to see if it's trying to interfere with Outlook - things like real time email checking can sometimes cause these kinds of problems. To troubleshoot, we can
    simply disable the anti-malware software temporarily to see the result.
    Regards,
    Melon Chen
    TechNet Community Support

Maybe you are looking for