Fórum

Maximum open cursors exceeded with Liferay 6.0 and Oracle

Junzhi He, modificado 11 Anos atrás.

Maximum open cursors exceeded with Liferay 6.0 and Oracle

New Member Postagens: 4 Data de Entrada: 01/05/12 Postagens Recentes
Hello,
I integrate Oracle, Ldap with my liferay. I config /tomcat-liferay/conf/context.xml to use <UserTransaction> to connect Oracle. The maxActive="20" and max-connections="100".
And I also configure Liferay import user from LDAP.At beginning, all works.But one or two hours after I startup server of tomcat liferay, there are exceptions:

22:07:17,037 ERROR [BasePersistenceImpl:188] Caught unexpected exception com.liferay.portal.kernel.exception.SystemException
22:07:17,043 ERROR [PortalLDAPImporterImpl:470] Unable to import user CN=test@caro.com,OU=caro.com,OU=Utilisateurs: null:null:{displayname=displayName: ClaudeLeduc}
com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.QueryTimeoutException: could not execute query
at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:195)
at com.liferay.portal.service.persistence.UserPersistenceImpl.setUserGroups(UserPersistenceImpl.java:7184)
at com.liferay.portal.service.impl.UserGroupLocalServiceImpl.setUserUserGroups(UserGroupLocalServiceImpl.java:264)
at sun.reflect.GeneratedMethodAccessor523.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy83.setUserUserGroups(Unknown Source)
at com.liferay.portal.service.UserGroupLocalServiceUtil.setUserUserGroups(UserGroupLocalServiceUtil.java:312)
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importGroups(PortalLDAPImporterImpl.java:563)
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAPByUser(PortalLDAPImporterImpl.java:465)
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:169)
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:122)
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:85)
at com.liferay.portal.security.ldap.PortalLDAPImporterUtil.importFromLDAP(PortalLDAPImporterUtil.java:30)
at com.liferay.portlet.admin.messaging.LDAPImportMessageListener.doReceive(LDAPImportMessageListener.java:38)
at com.liferay.portlet.admin.messaging.LDAPImportMessageListener.receive(LDAPImportMessageListener.java:30)
at sun.reflect.GeneratedMethodAccessor592.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:54)
at $Proxy236.receive(Unknown Source)
at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:57)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:63)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:61)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.QueryTimeoutException: could not execute query
at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:195)
at com.liferay.portal.service.persistence.UserPersistenceImpl.getUserGroups(UserPersistenceImpl.java:6839)
at com.liferay.portal.service.persistence.UserPersistenceImpl.getUserGroups(UserPersistenceImpl.java:6774)
at com.liferay.portal.service.persistence.UserPersistenceImpl.getUserGroups(UserPersistenceImpl.java:6756)
at com.liferay.portal.service.persistence.UserPersistenceImpl.setUserGroups(UserPersistenceImpl.java:7171)
Caused by: java.sql.SQLException: ORA-01000: maximum open cursors exceeded

And I know SQLException: ORA-01000: maximum open cursors exceeded is because we creat statement with JDBC but don't close it, so the cursors of DB will become more and more and then out of system limit.But Liferay access DB and import LDAP user automatically, so it this a bug of Liferay.Or we did a wrong configuration of JTA tomcat like this:
<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@applppr1.oracle:1521:applppr1"
username="****"
password="****"
factory="org.objectweb.jotm.datasource.DataSourceFactory"
maxActive="20"
max-connections="100"/>
Anyone know the answer or face the same problem.
Please give a little help.