Because database queries are frequently called in the for loop, too many preparedstatement statements are not closed in time, resulting in the number of cursors exceeding the limit.
Modify the datasource configuration and change poolpreparedstatements to false (this can be used regardless of ibatis and JDBC ).
<Bean id = "datasource" class = "org. Apache. commons. DBCP. basicdatasource" Destroy-method = "close">
<Property name = "driverclassname" value = "oracle. JDBC. Driver. oracledriver"/>
<Property name = "url" value = "JDBC: oracle: thin: @ ******: *****"/>
<Property name = "username" value = "admin"/>
<Property name = "password" value = "******"/>
<Property name = "maxactive" value = "50"/>
<Property name = "maxwait" value = "20"/>
<Property name = "poolpreparedstatements" value =" False "/>
<Property name = "defaultautocommit" value = "true"/>
</Bean>