java.sql.SQLException: Unable to get a physical connection from the database...there are no connections available.

Oracle Community | Grjozs | 4 years ago
  1. 0

    OAS 10g lost connection to database

    Oracle Community | 4 years ago | Grjozs
    java.sql.SQLException: Unable to get a physical connection from the database...there are no connections available.
  2. 0

    Unable to Log In to Oracle VM Manager via browser

    Oracle Community | 6 years ago | 765907
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionError Code: 17002
  3. 0

    How to avoid Flyway Migrations locking the SQLite Database?

    Stack Overflow | 2 years ago
    java.sql.SQLException: [SQLITE_BUSY] The database file is locked when two or more connections are active. Thats why we tried ... 2. ...Using a Connection Pool of size 1 We reduced the number of parallel database connections to one (by configuring our Tomcat JDBC connection pool with "maxActive=1"). But now, Flyway fails with ... org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spurious "No database selected" errors with Slick/Tomcat/MariaDB Galera Cluster

    Stack Overflow | 2 years ago
    java.sql.SQLException: No database selected errors. At that point, some (but not all) queries will start failing with this exception. The problem can be temporarily "fixed" by restarting tomcat. The obvious source of a "No database selected" error is that the database schema name is not specified in the connection setup, however, the DB connection parameters are given once in the application config that gets loaded at start-up so if that was incorrect we would see this error immediately. The schema name is not modified programmatically after start-up. We don't open connections independent of the connection pool interface. We have been unable to replicate this error anywhere outside the production environment. Load appears to be a factor but it is unclear how. No particular query is associated with the error and examination of the MariaDB logs did not turn up anything interesting. We don't see other DB connection errors like timeouts or connections being unexpectedly closed. We also tried switching from BoneCP to HikariCP which had no effect. Somehow the connection is "losing" the schema name or this error is masking some other condition. What could cause this to happen? What (reasonably) non-invasive logging or diagnostics could we run against our production environment to diagnose the issue? Sample stack trace: java.sql.SQLException: No database selected
  6. 0

    No Free Connections

    Google Groups | 5 years ago | Josh Kamau
    java.sql.SQLException: Unsuccessfully waited [1000] millis for a connection to be returned. No connections are free. You need to Increase the max connections of [20] or look for a connection pool leak using datasource.xxx.capturestacktrace=true

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      Unable to get a physical connection from the database...there are no connections available.

      at oracle.oc4j.sql.spi.ManagedConnectionImpl$GenericConnectionUseStrategy.initForUse()
    2. oracle.oc4j.sql
      ManagedConnectionFactoryImpl.createManagedConnection
      1. oracle.oc4j.sql.spi.ManagedConnectionImpl$GenericConnectionUseStrategy.initForUse(ManagedConnectionImpl.java:1188)
      2. oracle.oc4j.sql.spi.ManagedConnectionImpl$OracleConnectionUseStrategy.initForUse(ManagedConnectionImpl.java:1233)
      3. oracle.oc4j.sql.spi.ManagedConnectionImpl.initForUse(ManagedConnectionImpl.java:156)
      4. oracle.oc4j.sql.spi.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:106)
      5. oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:171)
      5 frames
    3. com.evermind.server
      ApplicationConnectionManager.createManagedConnection
      1. com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1461)
      1 frame
    4. oracle.j2ee.connector
      ConnectionPoolImpl.getManagedConnection
      1. oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnectionFromFactory(ConnectionPoolImpl.java:329)
      2. oracle.j2ee.connector.ConnectionPoolImpl.access$900(ConnectionPoolImpl.java:100)
      3. oracle.j2ee.connector.ConnectionPoolImpl$NonePoolingScheme.getManagedConnection(ConnectionPoolImpl.java:1233)
      4. oracle.j2ee.connector.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:792)
      4 frames
    5. oracle.oc4j.sql
      ConnectionPoolImpl.getManagedConnection
      1. oracle.oc4j.sql.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:45)
      1 frame
    6. com.evermind.server
      ApplicationConnectionManager.allocateConnection
      1. com.evermind.server.connector.ApplicationConnectionManager.getConnectionFromPool(ApplicationConnectionManager.java:1700)
      2. com.evermind.server.connector.ApplicationConnectionManager.acquireConnectionContext(ApplicationConnectionManager.java:1640)
      3. com.evermind.server.connector.ApplicationConnectionManager.allocateConnection(ApplicationConnectionManager.java:1580)
      3 frames
    7. oracle.j2ee.connector
      OracleConnectionManager.allocateConnection
      1. oracle.j2ee.connector.OracleConnectionManager.unprivileged_allocateConnection(OracleConnectionManager.java:265)
      2. oracle.j2ee.connector.OracleConnectionManager.allocateConnection(OracleConnectionManager.java:214)
      2 frames
    8. oracle.oc4j.sql
      ManagedDataSource.getConnection
      1. oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:272)
      2. oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:200)
      3. oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:142)
      4. oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:127)
      4 frames
    9. lv.dati.eks
      LogManagerBean.log
      1. lv.dati.eks.helpers.PersistenceHelper.getConnection(PersistenceHelper.java:62)
      2. lv.dati.eks.logging.LogImpl.writeLog(LogImpl.java:371)
      3. lv.dati.eks.logging.LogManagerBean.log(LogManagerBean.java:29)
      3 frames
    10. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    11. com.evermind.server
      StatelessSessionEJBObject.OC4J_invokeMethod
      1. com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
      2. com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
      3. com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
      4. com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
      5. com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
      6. com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
      7. com.evermind.server.ejb.interceptor.system.TxNotSupportedInterceptor.invoke(TxNotSupportedInterceptor.java:43)
      8. com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
      9. com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
      10. com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
      11. com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
      12. com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
      12 frames
    12. Unknown
      LogManager_LocalProxy_3ldln8.log
      1. LogManager_LocalProxy_3ldln8.log(Unknown Source)
      1 frame
    13. lv.dati.eks
      MessageManagerBean.getEAAD
      1. lv.dati.eks.logging.LogImpl.ejbLog(LogImpl.java:173)
      2. lv.dati.eks.logging.LogImpl.log(LogImpl.java:158)
      3. lv.dati.eks.logging.LogImpl.error(LogImpl.java:309)
      4. lv.dati.eks.services.external.MessageManagerBean.getEAAD(MessageManagerBean.java:338)
      4 frames
    14. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor836.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    15. com.evermind.server
      StatelessSessionEJBObject.OC4J_invokeMethod
      1. com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
      2. com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
      3. com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
      4. com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
      5. com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
      6. com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
      7. com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
      8. com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
      9. com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
      10. com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
      11. com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
      12. com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
      12 frames
    16. Unknown
      MessageManager_RemoteProxy_3ldln8.getEAAD
      1. MessageManager_RemoteProxy_3ldln8.getEAAD(Unknown Source)
      1 frame
    17. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor835.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    18. com.evermind.server
      RmiMethodCall.run
      1. com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:67)
      1 frame
    19. com.evermind.util
      ReleasableResourcePooledExecutor$MyWorker.run
      1. com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
      1 frame
    20. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame