Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • After a long idle time, the connection pool fails to hand out connections

    Posted on

    We are running ReaHat EAP 6.4 and we have a number of JDBC connections to a MS SQL Server 2012 DBMS that work fine after startup and work fine while using the server all day long. It will continue to work fine the next day if someone was doing something on it the day before. Every morning we have a timer process that wakes up, accesses the database and sends out an email to the team about the health of the server. This is the process that fails if no one has been on the server the day before. It fails with the following exception:

    05:30:09,609 ERROR [stderr] (Thread-135) java.sql.SQLException: Unable to obtain a connection from Database Access "java:comp/env/jdbc/NapersoftRepository".Initial Context lookup failed for java:comp/env/jdbc/NapersoftRepository.
    05:30:09,609 ERROR [stderr] (Thread-135) at com.napersoft.databases.R80.NIDatabaseAccessManager.initialize(Unknown Source)
    05:30:09,609 ERROR [stderr] (Thread-135) at com.napersoft.databases.R80.NIDatabaseAccessManager.getConnectionToCurrentInternalRepository(Unknown Source)
    05:30:09,609 ERROR [stderr] (Thread-135) at com.napersoft.dataformat.NIDataLookUpTable.initialize(Unknown Source)
    05:30:09,609 ERROR [stderr] (Thread-135) at com.napersoft.dataformat.framework.impl.NIDevLookUpTable.load(Unknown Source)
    05:30:09,609 ERROR [stderr] (Thread-135) at com.napersoft.demo.filesend.NapersoftCCMFileSendPlugin.checkJobClassMonitorName(Unknown Source)
    05:30:09,609 ERROR [stderr] (Thread-135) at com.napersoft.demo.filesend.NapersoftCCMFileSendPlugin.processRequest(Unknown Source)
    05:30:09,609 ERROR [stderr] (Thread-135) at com.napersoft.demo.filesend.NapersoftCCMFileSendPlugin.handleJCMBegin(Unknown Source)
    05:30:09,609 ERROR [stderr] (Thread-135) at com.napersoft.distribution.NIDistributionScheduledJCM.run(Unknown Source)
    05:30:09,609 ERROR [stderr] (Thread-135) at java.lang.Thread.run(Thread.java:745)

    I added some code to re-try getting the connection with a small wait in between each try hoping it was some stale connection pool issue, but every attempt results in the same error. We have to restart the Server in order to get things back to normal.

    Here is the database entry in the standalone-full.xml:

                
                    
                        qa-w64-sql2012
                    
                    
                        NapersoftRepository_CCM8
                    
                    
                        cursor
                    
                    com.microsoft.sqlserver.jdbc.SQLServerXADataSource
                    mssql
                    select 1
                    TRANSACTION_SERIALIZABLE
                    
                        5
                        50
                        false
                        false
                        false
                        false
                    
                    
                        NapersoftCCMEncryptedPassword
                    
                    
                        select 1
                        false
                        false
                    
                    
                        false
                        5000
                        15
                        0
                        0
                        5
                        5000
                        0
                    
                    
                        false
                    
                
    

    At this point we have no idea why the connection pool seems to go bad after something like 12 - 16 hours of not being used.

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat