Hi,
We have recently migrated to tomee+ 1.5.1 from Jboss. Until now everything
was working good. But when we are running large processes it is throwing
error "maximum open cursors exceeded". We have around 60 entity beans(CMP)
.Also, We are not manually opening or closing any connection everything is
done by Container only.We are just working on Entity.
After googling we found this may be related to statement caching, which is
controlled two property i.e. "PoolPreparedStatements" and
"maxOpenPreparedStatements" in tomee.xml.
Tomee.xml :::
<Resource id="RageDataSource" type="DataSource">
JdbcDriver oracle.jdbc.driver.OracleDriver
JdbcUrl jdbc:oracle:thin:@<ID>:5584:PLTDEV
UserName test
Password test
JtaManaged true
PoolPreparedStatements true
maxOpenPreparedStatements 200
</Resource>
<Resource id="RageNoTxDataSource" type="DataSource">
JdbcDriver oracle.jdbc.driver.OracleDriver
JdbcUrl jdbc:oracle:thin:@<ID>:5584:PLTDEV
UserName test
Password test
JtaManaged false
PoolPreparedStatements true
maxOpenPreparedStatements 200
</Resource>
Error:
javax.ejb.EJBException: The transaction has been marked rollback only
because the bean encountered a non-application exception
:org.apache.openjpa.persistence.PersistenceException : ORA-00604: error
occurred at recursive SQL level 1
ORA-01000: maximum open cursors exceeded
ORA-00604: error occurred at recursive SQL level 1
ORA-01000: maximum open cursors exceeded
ORA-01000: maximum open cursors exceeded
{prepstmnt 1636515580 SELECT t0.CMPT_SEQ_ID, t0.TFP_PROPERTYNAME,
t0.TFP_PROPVAL, t0.TFP_PROPVAL_DATATYPE, t0.TFP_UPDATE_COUNT FROM
TASK_CONFIGURATION t0 WHERE (t0.CMPT_SEQ_ID = ?) [params=?]} [code=604,
state=60000]
at
com.rage.common.util.AppServerUtility.getException(AppServerUtility.java:412)
at
com.rage.common.dal.TaskDBUtility.getTaskConfigurations(TaskDBUtility.java:3011)
at
com.rage.process.bizcomp.ProcessFlowchartFacadeBean.get(ProcessFlowchartFacadeBean.java:317)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
at org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:128)
at
org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:43)
at org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:64)
at
org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:70)
at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
at
org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:176)
at
org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:95)
at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:138)
at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:237)
at
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:189)
at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:253)
at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:248)
at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:92)
at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:279
Thanks,
Bibhuti
--
View this message in context:
http://openejb.979440.n4.nabble.com/maximum-open-cursors-exceeded-in-entity-bean-tp4661896.html
Sent from the OpenEJB User mailing list archive at Nabble.com.