Grails -- PooledConnection has already been closed
<p>I use grails 2.3.11 and Oracle DB's on my project. </p>

<p>I have a problem with the database. 
Exception:</p>

<pre><code>ERROR (org.hibernate.util.JDBCExceptionReporter) - [99824F7C5386E5A40F94939FF36481FE | admin] - PooledConnection has already been closed.
</code></pre>

<p>The error appears when when running the following code:</p>

<pre><code>@NotTransactional
@Cacheable
def findSmth(String Id) {
     //Some logic here

    Employee.findWhere(company: company, employee: employee)
}
</code></pre>

<p>This piece of code is executed repeatedly and an error occurs on some iteration.</p>

<p>Note: i use multiple datasources. The error occurs in the database with the following datasource:</p>

<pre><code>dataSource_employee_ro {
    dbCreate = 'validate'
    dialect = org.hibernate.dialect.Oracle10gDialect
    driverClassName = "oracle.jdbc.driver.OracleDriver"
    url = 'jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = ****)(PORT = 2001))(FAILOVER = true)(LOAD_BALANCE = on)(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = ****)(FAILOVER_MODE = (TYPE=select) (METHOD=basic) (RETRIES=10) (DELAY=3))))'
    username = '****'
    password = '******'
    readOnly = true
    properties {
        maxActive = 10
        maxIdle = 5
        minIdle = 1
        initialSize = 8
        testOnBorrow = true
        testWhileIdle = true
        testOnReturn = false
        validationQuery = "SELECT 1 FROM dual"
    }
    domainSchema = '*****'
}
</code></pre>

<p>Exception appears even when i set 'isPooled = false' (it looks like "connection already closed"). </p>

<p>I can not figure out how to get rid of this error. 
Can anyone help me? Thanks.</p>