1

Deployed web application in weblogic 12c server and it has data source configure to make use of connection pool. Database is Oracle 12, Usecase: when application is alive up and running, for a min database backup script has been run(stop db, backup, start db), after that when trying to access application(session got established) then got SQL error (connection already closed). What could be an issue?

Temporary solution: after restarting application it was working fine with out any issue. Still wondering how it got worked?

Datasource configuration :

**dataSource {
    configClass = GrailsAnnotationConfiguration.class
    dialect = "org.hibernate.dialect.Oracle10gDialect"
    loggingSql = false
    jmxExport = false
}


hibernate {
    cache.use_second_level_cache = true
    cache.use_query_cache = true
    cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider'
    hbm2ddl.auto = null
    show_sql = false
//      naming_strategy = "org.hibernate.cfg.ImprovedNamingStrategy"
    dialect = "org.hibernate.dialect.Oracle10gDialect"
    config.location = [
            "classpath:hibernate-core.cfg.xml",
            "classpath:hibernate-utility.cfg.xml"
    ]
}


// environment specific settings
environments {
    development {
        dataSource {
        }
    }
    test {
        dataSource {
        }
    }
    production {
        dataSource {
        }
    }
}**
  • Why are you shutting down the DB to back it up? Is this via `rman`, or some other mechanism you've put together yourself? Anyway, it sounds like you have connections that were established before the shutdown, and when you try to use them after the restart they are obviously no longer alive. Have you enabled connection checks in your WLS JDBC pool config? – Alex Poole Dec 13 '18 at 17:14
  • 1
    It would be helpful if you included your DataSource configuration in your question. – Joshua Moore Dec 13 '18 at 17:37
  • @Alex Poole, yes wls jdbc pool config enabled. – user3260053 Dec 13 '18 at 17:56
  • @Joshua Moore, yeah will do that.thanks. it's not allowing more than 5.. – user3260053 Dec 13 '18 at 17:58
  • @user3260053 - [edit your question](https://stackoverflow.com/posts/53766623/edit) to add information, especially things like code or configs; don't try to put it in comments. – Alex Poole Dec 13 '18 at 18:12
  • @AlexPoole, I have added data source configuration details. looks like some code issue. for example when we take any connection from the pool and close the connection then it might occur. like : sessionfactory.getcurrentsession().getconnection() after that in finally block have sql.close (it means close the connection). – user3260053 Dec 14 '18 at 11:53
  • I'm pretty sure that ought to return the connection to the pool, rather than actually closing it. That's kind of the point of having the pool. But I was talking about the WLS pool config and session-test settings, I don't use hibernate, so I'm out... good luck! – Alex Poole Dec 14 '18 at 12:09

0 Answers0