I use grails 2.3.11 and Oracle DB's on my project.
I have a problem with the database. Exception:
ERROR (org.hibernate.util.JDBCExceptionReporter) - [99824F7C5386E5A40F94939FF36481FE | admin] - PooledConnection has already been closed.
The error appears when when running the following code:
@NotTransactional
@Cacheable
def findSmth(String Id) {
//Some logic here
Employee.findWhere(company: company, employee: employee)
}
This piece of code is executed repeatedly and an error occurs on some iteration.
Note: i use multiple datasources. The error occurs in the database with the following datasource:
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 = '*****'
}
Exception appears even when i set 'isPooled = false' (it looks like "connection already closed").
I can not figure out how to get rid of this error. Can anyone help me? Thanks.
Aucun commentaire:
Enregistrer un commentaire