Database Error: RSR0009: Resource not available for pool. Wait-time expired

i am occassionally receiving the following error during database connections in my servlet:
Database Error: RSR0009: Resource not available for pool [webAdvisorTestPool]. Wait-time expired
i understand that this is a result of a connection leak from improper closure of my Connection object, but i thought that i was properly closing my connection.
i can get the error if i do the following steps:
1) access my login page and enter login credentials.
2) submit the login which then hits the Authentication servlet.
3) Authentication servlet authenticates and takes me to home page.
4) hit the back button to get back to the login page.
5) repeat this process until i hit the Max Pool Size (from web server).
6) then i get the error message
here are some details:
i have an Authentication servlet; here is the pertinent code from that servlet:
try {     // retrieve the user and add the User object to the session     DAO dao = new DAO();     Person authenticUser = dao.getPerson(userID, password);     session.setAttribute("validUser", authenticUser);     redirectPage = mapping.findForward("success"); }
i also have a DAO object that handles all of my DB transactions (and you can see from my code above that the Authentication servlet is using that object); here is the pertinant code from that servlet:
public DAO() {     datasource = "java:comp/env/jdbc/webAdvisorTest"; } public Person getPerson(String userID, String password)     throws ObjectNotFoundException {     // JDBC variables     DataSource ds = null;     Connection conn = null;     PreparedStatement stmt = null;     ResultSet results = null;     // User variables     Person validUser = null;     try     {         // Retrieve the DataSource from JNDI         InitialContext ctx = new InitialContext();         // if this statement fails, NamingException is thrown         ds = (DataSource)ctx.lookup(datasource);         // get DB connection and perform SQL operations         conn = ds.getConnection();         // User variables         String validUserID = null;         String validFName = null;         String validLName = null;         String validEmail = null;         // get DB connection and perform SQL operations         conn = ds.getConnection();         stmt = conn.prepareStatement(PERSON_QUERY);         stmt.setString(1, userID);         stmt.setString(2, password);         results = stmt.executeQuery();         // iterate through the results         if (results.next())         {             validUserID = results.getString("id");             validFName = results.getString("first_name");             validLName = results.getString("last_name");             validUser = new Person(validUserID, validFName, validLName);         }     }     // handle SQL errors     catch(SQLException e)     {         e.printStackTrace(System.err);         throw new RuntimeException("Database Error: " + e.getMessage());     }     // handle JNDI errors     catch(NamingException e)     {         throw new RuntimeException("JNDI Error: " + e.getMessage());     }     // clean up resources     finally     {         doClosure(results, stmt, conn);     }     // if the user was not found, throw ObjectNotFoundException     if(validUser == null)     {         throw new ObjectNotFoundException();     }     return validUser; } protected void doClosure(ResultSet results, PreparedStatement stmt,     Connection conn) {     if (results != null)     {         try { results.close(); }         catch (SQLException e) { e.printStackTrace(System.err); }     }     if (stmt != null)     {         try { stmt.close(); }         catch (SQLException e) { e.printStackTrace(System.err); }     }     if (conn != null)     {         try         {             System.out.println("R18Resources.conn before close: " + conn);             conn.close();             System.out.println("R18Resources.conn after close: " + conn);             System.out.println("R18Resources.conn is closed? " +                 conn.isClosed());         }         catch (SQLException e)         {             System.out.println("R18Resource conn close error: " +                 e.getMessage());         }     } }
as you can see, i've added some print statements in my connection closure block. based on my output log, each connection is being properly closed and i am not encountering any errors during that closing block.
any ideas???
Message was edited by:
millerand

Please try the following code in your doClosure method. Replace your code with the following code.
public void doClosure(ResultSet pResultSet, Statement pStmt, Connection pConn) throws Exception {
try {
               if (pResultSet != null) {
                    pResultSet.close();
                    pResultSet = null;
          } catch (SQLException se) {
          logger.error( se );
          } finally {
               try {
                    if (pStmt != null) {
                         pStmt.close();
                         pStmt = null;
               } catch (SQLException se) {
               logger.error(se);
               } finally {
                    try {
                         if (pConn != null) {
                              pConn.close();
                              pConn = null;
                    } catch (SQLException se) {
                    logger.error(se);
And let me know if you still face this issue. What is the application server you are using?

Similar Messages

  • Greeting Card Error "Valid size not available for this creation"

    I am trying to create a greeting card with photoshop elements 10, but I keep getting this error.
    How can I create a greeting card?

    Start by trying this:
    http://forums.adobe.com/message/4248688

  • After downloading Yosemite iPhoto is blocked.  Update error message reads: Update not available for this ID either because it was bought by a different user...

    After downloading Yosemite iPhoto is blocked.  Directed to update.  Update error message: Update not available for this ID either because it was bought by a different user.....  This could be because my iPhone is now linked to the Mac and it is recognising that ID.

    My previous post should read...Could this be because my iPhone is now linked to the Mac and is recognising that ID?

  • Sticky resource not available - ACE Module

    hi,
    I am getting the below error on defining stickiness. Please assist.
    switch/Admin(config)# sticky ip-netmask 255.255.255.255 address both ACE-CKH-STICKY
    Error: sticky resource not available
    Thanks.

    Note The syslog message statistics do not include the syslogs generated from the dataplane when you enable the logging of connection setup and teardown syslog messages through the logging fastpath command.
    •regexp-Limits the amount of regular expression memory.
    •sticky-Limits the number of entries in the sticky table. You must configure a minimum value for sticky to allocate resources for sticky entries, because the sticky software receives no resources under the unlimited setting.
    •xlates-Limits the number of network and port address translations entries.
    •minimum number-Specifies the lowest acceptable value. Enter an integer from 0.00 to 100.00 percent (two-decimal places of granularity). The number argument specifies a percentage value for all contexts that are members of the class. When used with the rate keyword, the number argument specifies a value per second.
    •maximum {equal-to-min | unlimited}-Specifies the maximum resource value: either the same as the minimum value or no limit.
    Note The limit that you set for individual resources when you use the limit-resource command overrides the limit that you set for all resources when you use the limit-resource all command.
    If you lower the limits for one context (context A) in order to increase the limits of another context (context B), you may experience a delay in the configuration change because the ACE will not lower the limits of context A until the resources are no longer being used by the context.
    For example, to allocate 20 percent of all resources (minimum and maximum) to all member contexts of the resource class, enter:
    (config-resource)# limit-resource all minimum 20% maximum equal-to-min
    System Resource Maximum Values
    Resource Maximum Value
    Application Acceleration Connections
    10000 connections
    ACL Memory
    34123184 bytes
    Buffer Memory (Syslog)
    1048576 bytes
    Concurrent Connections
    1,000,000 connections (Layer 4),
    100,000 connections (SSL)
    HTTP Compression
    100 megabits per second (Mbps). You can upgrade the ACE maximum HTTP compression rate to 1 Gbps by purchasing a separate license from Cisco Systems. For more information, see the Cisco 4700 Series Application Control Engine Appliance Administration Guide.
    Management Connections
    5000 connections
    Proxy Connections (Layer 7)
    256,000 connections
    Rate
    Bandwidth
    1 gigabits per second (Gbps). You can upgrade the ACE maximum bandwidth to 2 Gbps by purchasing a separate license from Cisco Systems. For more information, see the Cisco 4700 Series Application Control Engine Appliance Administration Guide.
    Connections (any kind)
    120,000 connections per second (Layer 4), 40, 000 connections per second (Layer 7)
    MAC miss
    2000 packets per second
    Management traffic
    125,000,000 bits per second
    SSL connections
    1000 transactions per second (TPS). You can upgrade the SSL bandwidth to a maximum of 7500 TPS with a separate license. For more information, see the Cisco 4700 Series Application Control Engine Appliance Administration Guide.
    syslog
    For traffic going to the ACE (control plane), 3000 messages per second
    For traffic going through the ACE (data plane), 120,000 messages per second
    Regular Expression Memory
    1,048,576 bytes
    Sticky Entries
    800,000 table entries
    Xlates (network and port address translation entries)
    64,000 Xlates (network entries),
    1,000,000 Xlates (port address translation entries)
    Kind Regards,
    Sachin Garg
    Senior Specialist Security
    HCL Comnet Ltd.
    http://www.hclcomnet.co.in
    A-10, Sector 3, Noida- 201301
    INDIA
    Mob: +91-9911757733
    Email: [email protected]

  • Sticky Resource Not Available when setting up sticky http-cookie

    When I try to configure the sticky:
    (config)# sticky http-cookie ACE-COOKIE COOKIE-STICKY
    I get the error:
    sticky resource not available
    An L7 policy has not yet been set up… could that be the reason for this error? Or, is it because I have not setup a class resource for the sticky cookie?

    Syed,
    I thought it resolved it, but it really didn't.
    Added the resource-class in the Admin context:
    resource-class any-available
    limit-resource all minimum 0.00 maximum unlimited
    limit-resource sticky minimum 35.00 maximum equal-to-min
    no difference.

  • Sticky resource not available ?

    I get the following error message then i try to configure sticky on an ACE:
    Error: sticky resource not available
    What is the problem ?
    I have release "c6ace-t1k9-mz.A2_1_2.bin" and sticky should be supported.
    ace-10/RGW_Front_servers(config)# sticky ip-netmask 255.255.255.255 address source RGW-FRONT
    Error: sticky resource not available
    Regards,
    Ola Haglund

    Hi Ola,
    By default sticky resources are not available. You need to go to the Admin context and define a new resource class with some stickiness. See Server LoadBalancing Guide Chapter 5 p8. For example:
    resource-class RC1
    limit-resource all minimum 0.00 maximum unlimited
    limit-resource sticky minimum 10.00 maximum equal-to-min
    Obviously the amount of sticky resource to allocate will depend on your application.
    And then you need to make the context that needs stickiness a member of that resource class.
    For example:
    context Test
    allocate-interface vlan 292-293
    member RC1
    HTH
    Cathy

  • Function not available for this responsibility - Custom Form

    Hello All,
    We developed a custom form and was working fine in Testing instance.
    Last week testing instance was refreshed.
    After that all the custom forms are not working. Seeded forms are working properly.
    We checked the form setup(ie form, function, menu and we ran compile security and bounced the server).
    Custom reports under the custom top are working fine.
    Only the form functions throwing the error
    "Function is not available for this responsibility".
    Any ideas. Is the test.class having any impact on this.
    Regards,
    Kannan Balasubramanian.

    Hi,
    Last week testing instance was refreshed.your answer is that the refreshed has remove the custom top definition from your environment.
    Check this
    knick

  • "Update not available for this id" after Yosemite upgrade

    Hello,
    I have a MacBook Pro (15-inch, Mid 2010) 2,53 GHz Intel Core i5.
    I upgraded O/S from Maverick to Yosemite. Now I try to perform latest update, and iMovie, Numbers, Keynote, Pages are listed in the Update list.
    However each time I try to update them, AppStore refused with the error "Update is not available for this id..."
    I did not change Apple Id since a long time, and performed latest update on Maverick before doing the upgrade.  I checked the "Purchases" tab, these applications are not listed, not sure they were listed before the upgrade. I tried to sign out / sign in with my apple id, still same issue.
    Anyone encountered same trouble ? What is the solution to fix this ? 
    Thanks,

    My previous post should read...Could this be because my iPhone is now linked to the Mac and is recognising that ID?

  • Error message "iTunes Helper Resources not available" and saving to wrong Drive

    I am trying to upgrade iTunes to 10.7 on my PC but I keep getting the error message "iTunes Helper Resources not available". Diagnostics take me a support page which talks about not being able to see the device in iTunes - but I can see the device without problems.
    I thought I would try reinstalling iTunes from the webpage and it downloaded to my PC fine but when I went to setup, it showed me it is saving to a DVD drive - not my Hard drive. It also won't let me change the location for the file. I have no idea how that's happened as I obviously don't use the DVD drive as a USB (although the PC see's it as one) and I've never chosen it as the location for iTunes in the 7-8 years that I've been using it.
    I then thought I'd try uninstalling it and reinstalling it (to the correct drive) but again, it comes up that the DVD drive is invalid and won't uninstall iTunes.
    So I'm stuck and haven't been able to find anything helpful on the support pages or in iTunes Help.
    Please someone help ...
    Thanks.

    Try the following user tip. (Probably, the section on clearing the installation database might be best given that you've currently got a drive on the problematic letter at the moment.)
    "Invalid drive X:\" install errors

  • Sql 2008 r2 property size is not available for database

    Nightly whenever index rebuild process runs My data file and log file gets full and when right click properties on database then I get the error: Property size is not available for database.This property may not exist for this object.
    What is the error means? What is my database state at that time?
    Thanks

    Nightly whenever index rebuild process runs My data file and log file gets full and when right click properties on database then I get the error: Property size is not available for database.This property may not exist for this object.
    What is the error means? What is my database state at that time?
    Thanks
    Hi Ajay
    Firstly, I have seen this before. Even though you have permissions to the database, when there is heavy load (Index rebuilds), I cannot access the database. Usually in this case, I just query the system tables for whatever I need.
    Secondly, your transaction log should not be filling up.
    What recovery model are you using?
    Do you have regular log backups? How often do they run?
    You need to plan properly for your transaction log growth.
    The data file fills up because the immediate sort of the index rebuild is being done in the database itself. You can change this to run in TempDB, provided your TempDB has been configured properly.
    Regards

  • Data Not Available. Statspack data is not available for this database insta

    Hi,
    while trying to configure the 9i db on grid control I installed the statspack data while configuring it. But now when I try to see the historical data as part of the performace tab for the 9i db it complains as below
    Data Not Available. Statspack data is not available for this database instance. Make sure that Statspack is installed on the target instance.
    Please shed some of your inputs.
    thanks in advance
    PK

    Hi,
    I think it is not installed.
    Using 1097660794 for database Id
    Using 1 for instance number
    , stats$database_instance di
    ERROR at line 9:
    ORA-00942: table or view does not exist
    I did exactly as it said while configuring the db. but seems like something is wrong. Can you please advise me on how can I install it in commandline.
    Thanks
    PK

  • Hello Vivek here, i was trying to download apps from itunes and i could get the error message as itunes currently not available for past 2 days

    Hello Vivek here, i was trying to download apps from itunes and i could get the error message as itunes currently not available for past 2 days, is there any problem ideally or, please leave a reply
    <Email Edited By Host>

    Hi vivekanandanganesan,
    Thanks for using Apple Support Communities.  This article has some steps you can try if you are unable to connect to the iTunes Store:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    Cheers,
    - Ari

  • Macbook pro - iPhoto keep prompting to update after Yosemite update. Error message when trying to update -This update is not available for this Apple ID either because it was bought by a different user or the item was cancelled

    macbook pro - iPhoto keep prompting to update after Yosemite update. Error message when trying to update -This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled. 

    I only have 1 apple ID and the same was used to set up this early 2011 macbook pro and iPhoto app. I don't want to loose out on any photos. I tried logging out of app store and back in but no luck. PLEEAASEE HELPP!!!
    This problem has been reported by quite a few forum members, who skipped the update to iPhoto 9.5.1 while running Mavericks. In that case try to purchase iPhoto again instead of updating.
    After making your backup try the following:
    Uninstall iPhoto by deleting it from the applications folder, but do not empty the Trash.
    Launch the App Store, click the "Store" menu, and sign in with your AppleID.
    Open the main page of the App Store and search for iPhoto.
    If iPhoto is listed as "Free", click the "Free" button to buy it with your current AppleID.
    If it is not showing as free, there is no help but contacting the App Store Support, as Niel pointed out: http://www.apple.com/support/mac/app-store/contact/

  • I just upgraded to Yosemite. Iphoto is now broken.  Upon upgrade receiving error "This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled."

    I just upgraded to Yosemite. Iphoto is now broken.  Upon upgrade receiving error "This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled."

    Perform the following, stopping with the first one which works:
    1. Open the Mac App Store's Purchases tab. If you're prompted to accept iPhoto into your Apple ID, do so.
    2. Move it out of the Applications folder(it may need to be put into the Trash temporarily), and then see if you can download it for free from its individual product page.
    3. Click here and contact Apple.
    (116137)

  • Why an Error Message "Valid size not available for this Creation" in Elements 10 Photo Collage

    I have several image editing programs, but I bought Elements 10 specifically to do things the others wouldn't.  I wish to make a photo collage but all I get when I try, after following the instructions in the "help" and "Elements 10 for Dummies" is an error message stating "Valid Size not available for this Creation."  A meaningless phrase anyway because nowhere does it request a "valid size." Please will someone tell me the magiac words to make my lovely collage automaticaslly, or shall I revert to doing it manually on one of my other excellant image editing programs?

    http://helpx.adobe.com/photoshop-elements/kb/error-valid-size-available-creation.html
    If nothing there helps, see post 4 in this thread:
    http://forums.adobe.com/message/4248143#4248143#4248143

Maybe you are looking for

  • OAS Patch Application Failure 10.1.2.0.2  to 10.1.2.3.0

    Hello, i am runnng RHEL 4.5 attempting to apply the 10.1.2.3.0 patch to my working installation of 10.1.2.0.2 standalone forms and reports services During the installation it comes up with the error Error invoking target 'frmweb_install frmcmp_instal

  • Balance sheet report display

    Hello Gurus, I have a requirement from my user to change the display of the balance sheet report. The requirement looks very simple and I tried changing the query in few different ways and I'm not able to achieve this. Can you please help me on this?

  • Java.lang.NullPointerException , with no refrence to my own source code....

    what can cause this exception ? it does not point to any of my own source classes , i works fine in OC4J 10.1.3.1 developer preview but not in 10.1.3.00 standalone 06/10/16 16:44:55.109 web2: Servlet error java.lang.NullPointerException      at com.s

  • Difference please

    Hi, Can anyone explain the difference between IN operator and EXISTS operator Regards

  • 'project must be rendered before it can be encoded'

    Why do I always get the message 'project must be rendered before it can be encoded' when I try to export using quicktime conversion to product an mpeg2 for DVD Studio Pro?