Application Module Instances that Fail to Acquire a Database Connection are Never Removed from the Application Module Pool (Doc ID 463876.1)

Last updated on AUGUST 04, 2016

Applies to:

Oracle JDeveloper - Version 10.1.2.0.0 to 10.1.3.0.4 [Release Oracle10g]
Information in this document applies to any platform.
***Checked for relevance on 17-Jun-2010***
***Checked for relevance on 06-Feb-2013***

Symptoms

JDeveloper 10.1.2 is used to create a simple web application with a single application module. The application has a simple JSP which displays the application module statistics too. The application is run locally with the database running. Access the page that requires DB access and check the statistics of the application module. Check that more than 3 concurrent sessions are possible and working OK. Now shut down the Oracle DBMS.

Now trying to access a page in the system that requires an application module instance will result in an error, stating that the application module could not be checked out (JBO-29000). Repeat 2 more times. The page should take longer to load, with a time-out as the stated reason for failure. Please continue to access data-pages bound to the application module until the time-out errors start appearing (JBO-28102).

Now starting the database and trying to access the page again displays the time-out error again. The application modules appear to have been placed in some reserved state, where they cannot be checked out anymore. The entire pool has been "frozen". The only way out is to restart the application server.

It seems that, when an application module fails to check out from the pool because a JDBC connection problem, the problem is detected only after the application module has been reserved, so the application module is no longer available in the pool. The available pool size effectively shrinks, until there are no more application modules available in the pool. Unfortunately, these broken, unavailable application modules are never removed from the pool, so it seems to be the case that the idle instance timeout mechanism detects the application modules as "checked out" (unavailable), so it cannot let the application module time out.

The testcase uses:
- JDeveloper 10.1.2.1.0 (Build 1913), UIX,
- Oracle DBMS 10g XE with Oracle JDBC drivers
- Java Version : 1.4.2_06

Download the testcase(rename to .zip) by clicking here.

Steps to reproduce the issue:

Database Setup


Running the testcase:

  1. Unzip the DemoAppmodPool.zip
  2. Open DemoAppmodPool.jws is JDeveloper 10.1.2
  3. Create a JDeveloper Database Connection to the "demo" user in the XE database. Call the database connection “demo”
  4. Run the file “setup.sql” (in the Model project of the provided “DemoAppmodPool” workspace) in SQL*Plus, to create a very simple schema (just one table with 3 rows)
  5. Start up the database server
  6. From JDeveloper, run (from the ViewController project) the “/viewEmployees” struts action (using the embedded OC4J container)
  7. You can then view the page at: http://localhost:8988/demo/viewEmployees.do on the local machine
  8. Open a separate browser (e.g. a new IE instance, with a new session) and open
    http://localhost:8988/demo/DumpPoolStatistics.jsp?poolname=siemens.ampooldemo.model.SimpleAppModLocal
    (of course the server/port may be different, depending where you run the application)
    This shows you the pool statistics of the application module
  9. Now, refresh the viewEmployees page in the first browser several times to make sure it works consistently. Refresh at least 5 times, to make sure at least 5 application modules are created in the pool
  10. View changes to the application module statistics in the second browser by refreshing the page. There should be 5 modules in the pool
  11. Shut down the database service
  12. Attempt to refresh the viewEmployees page in the relevant browser. It should fail to check out an application module. The following error message is thrown:
    500 Internal Server Error
    JBO-30003: The application pool (siemens.ampooldemo.model.SimpleAppModLocal) failed to checkout an application module due to the following exception:oracle.jbo.JboException:
    JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-26061: Error while opening JDBC connection. at oracle.jbo.JboException.<init>(JboException.java:343)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1772)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1768)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2611)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:441)
    at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:230)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:411)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:406)
    at oracle.adf.model.bc4j.DCJboDataControl.rebuildApplicationModule(DCJboDataControl.java:1336)
    at oracle.adf.model.bc4j.DCJboDataControl.beginRequest(DCJboDataControl.java:1234)
    at oracle.adf.model.servlet.ADFBindingFilter.invokeBeginRequest(ADFBindingFilter.java:276)
  13. Check out the latest application module statistics: there should be fewer than 5 application modules available in the pool (although there should still be exactly 5 that exist in the pool)

  14. Refresh the viewEmployees page at least 5 times with the database service still unavailable. After the 5th refresh, there will be a long delay before the error message is displays. This time not a quick failed checkout, but a resource timeout. The error thrown is:
    500 Internal Server Error
    oracle.jbo.pool.ResourcePoolException: JBO-28102: A request was timed out while waiting for a resource to be returned to the resource pool, siemens.ampooldemo.model.SimpleAppModLocal. at oracle.jbo.pool.ResourcePool.allocateResource(ResourcePool.java:1088) at oracle.jbo.common.ampool.ApplicationPoolImpl.findAvailableInstance(ApplicationPoolImpl.java:804) at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1721) at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2611) at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:441) at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:230) at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:411) at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:406) at oracle.adf.model.bc4j.DCJboDataControl.rebuildApplicationModule(DCJboDataControl.java:1336) at oracle.adf.model.bc4j.DCJboDataControl.beginRequest(DCJboDataControl.java:1234) at oracle.adf.model.servlet.ADFBindingFilter.invokeBeginRequest(ADFBindingFilter.java:276) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:234) at com.evermind[Oracle Application Server Containers for J2EE 10g
  15. Look at the statistics: there are now 5 existing application modules, but zero are available
  16. Restart the database service
  17. Attempt to refresh the viewEmployees page. The timeout problem persists. The application modules do not become available again

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms