掲示板

Liferay not update users list from AD

8年前 に Adel B によって更新されました。

Liferay not update users list from AD

Junior Member 投稿: 47 参加年月日: 14/08/05 最新の投稿
Hello
After this error, liferay is no longer adding new users added in Active directory!


13:19:16,504 ERROR [liferay/scheduler_dispatch-4][JDBCExceptionReporter:82] Duplicate entry 'com.liferay.portal.security.ldap.PortalLDAPImporterUtil-10154' for key 'IX_228562AD'
13:19:16,511 ERROR [liferay/scheduler_dispatch-4][DefaultTransactionExecutor:93] Application exception overridden by commit exception
org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into Lock_ (uuid_, companyId, userId, userName, createDate, className, key_, owner, inheritable, expirationDate, lockId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update


do you have any idea how to solve this problem ??
thank you
thumbnail
8年前 に David H Nebinger によって更新されました。

RE: liferay not update users list from AD

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
Try posting full stack trace.

My guess is that it is an incomplete user record causing some sort of failure sling ldap import. Often this can happen if you import a system Account, they often don't have a complete user account.
8年前 に Adel B によって更新されました。

RE: liferay not update users list from AD

Junior Member 投稿: 47 参加年月日: 14/08/05 最新の投稿
thank you for your replay
A Full stack trace :


02:50:03,618 ERROR [liferay/scheduler_dispatch-4][JDBCExceptionReporter:82] Duplicate entry 'com.liferay.portal.security.ldap.PortalLDAPImporterUtil-10154' for key 'IX_228562AD'
02:50:03,630 ERROR [liferay/scheduler_dispatch-4][DefaultTransactionExecutor:93] Application exception overridden by commit exception
org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into Lock_ (uuid_, companyId, userId, userName, createDate, className, key_, owner, inheritable, expirationDate, lockId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
	at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:637)
	at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:793)
	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:664)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.processCommit(DefaultTransactionExecutor.java:82)
	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:70)
	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
	at com.sun.proxy.$Proxy52.lock(Unknown Source)
	at com.liferay.portal.service.LockLocalServiceUtil.lock(LockLocalServiceUtil.java:347)
	at com.liferay.portal.security.ldap.CustomPortalLDAP.importFromLDAP(CustomPortalLDAP.java:127)
	at com.liferay.portal.security.ldap.CustomPortalLDAP.importFromLDAP(CustomPortalLDAP.java:102)
	at com.liferay.portal.security.ldap.PortalLDAPImporterUtil.importFromLDAP(PortalLDAPImporterUtil.java:39)
	at com.liferay.portlet.admin.messaging.LDAPImportMessageListener.doReceive(LDAPImportMessageListener.java:51)
	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
	at sun.reflect.GeneratedMethodAccessor742.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
	at com.sun.proxy.$Proxy296.receive(Unknown Source)
	at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:76)
	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69)
	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
	at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
	at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:656)
	... 25 more
Caused by: java.sql.BatchUpdateException: Duplicate entry 'com.liferay.portal.security.ldap.PortalLDAPImporterUtil-10154' for key 'IX_228562AD'
	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
	at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1135)
	at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
	... 33 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'com.liferay.portal.security.ldap.PortalLDAPImporterUtil-10154' for key 'IX_228562AD'
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.Util.getInstance(Util.java:386)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
	... 37 more
02:50:03,634 ERROR [liferay/scheduler_dispatch-4][ParallelDestination:72] Unable to process message {destinationName=liferay/scheduler_dispatch, response=null, responseDestinationName=null, responseId=null, payload=null, values={JOB_NAME=com.liferay.portlet.admin.messaging.LDAPImportMessageListener, EXCEPTIONS_MAX_SIZE=0, GROUP_NAME=com.liferay.portlet.admin.messaging.LDAPImportMessageListener, DESTINATION_NAME=liferay/scheduler_dispatch, JOB_STATE=com.liferay.portal.kernel.scheduler.JobState@178af53a, companyId=0, MESSAGE_LISTENER_CLASS_NAME=com.liferay.portlet.admin.messaging.LDAPImportMessageListener, RECEIVER_KEY=com.liferay.portlet.admin.messaging.LDAPImportMessageListener.com.liferay.portlet.admin.messaging.LDAPImportMessageListener, MESSAGE_LISTENER_UUID=66ba8c06-f0de-45a8-bb22-c86692fd2afa}}
com.liferay.portal.kernel.messaging.MessageListenerException: org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into Lock_ (uuid_, companyId, userId, userName, createDate, className, key_, owner, inheritable, expirationDate, lockId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:32)
	at sun.reflect.GeneratedMethodAccessor742.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
	at com.sun.proxy.$Proxy296.receive(Unknown Source)
	at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:76)
	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69)
	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into Lock_ (uuid_, companyId, userId, userName, createDate, className, key_, owner, inheritable, expirationDate, lockId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
	at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:637)
	at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:793)
	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:664)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.processCommit(DefaultTransactionExecutor.java:82)
	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:70)
	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
	at com.sun.proxy.$Proxy52.lock(Unknown Source)
	at com.liferay.portal.service.LockLocalServiceUtil.lock(LockLocalServiceUtil.java:347)
	at com.liferay.portal.security.ldap.CustomPortalLDAP.importFromLDAP(CustomPortalLDAP.java:127)
	at com.liferay.portal.security.ldap.CustomPortalLDAP.importFromLDAP(CustomPortalLDAP.java:102)
	at com.liferay.portal.security.ldap.PortalLDAPImporterUtil.importFromLDAP(PortalLDAPImporterUtil.java:39)
	at com.liferay.portlet.admin.messaging.LDAPImportMessageListener.doReceive(LDAPImportMessageListener.java:51)
	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
	... 11 more
Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
	at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
	at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:656)
	... 25 more
Caused by: java.sql.BatchUpdateException: Duplicate entry 'com.liferay.portal.security.ldap.PortalLDAPImporterUtil-10154' for key 'IX_228562AD'
	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
	at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1135)
	at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
	... 33 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'com.liferay.portal.security.ldap.PortalLDAPImporterUtil-10154' for key 'IX_228562AD'
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.Util.getInstance(Util.java:386)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
	... 37 more
thumbnail
8年前 に David H Nebinger によって更新されました。

RE: liferay not update users list from AD

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
The duplicate exception to me seems to point to perhaps a failed previous run...
8年前 に Adel B によって更新されました。

RE: liferay not update users list from AD

Junior Member 投稿: 47 参加年月日: 14/08/05 最新の投稿
Thank you Mr David, but what do you mean by "failed previous run" ? this exception is repeated in every ldap import interval !
Do you have any suggestions ?
thank you
thumbnail
8年前 に David H Nebinger によって更新されました。

RE: liferay not update users list from AD

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
Either one of two things have occurred...

1. There was a failed run that left a record in the task table, and that is preventing the subsequent run to occur.

2. There is another run going in parallel and that one prevents the other run. This could be because you are running the next job before the current one can complete our you have some sort of cluster setup.
7年前 に Madasamy P によって更新されました。

RE: liferay not update users list from AD

Junior Member 投稿: 90 参加年月日: 16/07/27 最新の投稿
David H Nebinger:
Either one of two things have occurred...

1. There was a failed run that left a record in the task table, and that is preventing the subsequent run to occur.

2. There is another run going in parallel and that one prevents the other run. This could be because you are running the next job before the current one can complete our you have some sort of cluster setup.



Hence , what is the solution of this ?