(IX_228562AD) violated on Server restart caused by a DuplicateLockException
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- Unique constraint (IX_228562AD) violated on Server restart. It could be shown as
- an ERROR log message in
JDBCExceptionReporter class and
- an INFO log error in
BackgroundTaskMessageListener class.
2022-04-20 11:32:25.855 ERROR [liferay/background_task-3][JDBCExceptionReporter:234] integrity constraint violation: unique constraint or index violation: IX_228562AD
2022-04-20 11:32:25.861 INFO [liferay/background_task-3][BackgroundTaskMessageListener:151] Unable to acquire lock, queuing background task 37387
- If the DEBUG log leves are activated for
BackgroundTaskMessageListener (see Adjusting Log Levels to persist after portal restart for more details), the full trace would be similar to this:
2022-04-20 11:32:25.855 ERROR [liferay/background_task-3][JDBCExceptionReporter:234] integrity constraint violation: unique constraint or index violation: IX_228562AD
2022-04-20 11:32:25.861 DEBUG [liferay/background_task-3][BackgroundTaskMessageListener:146] Unable to acquire lock, queuing background task 37387
com.liferay.portal.kernel.lock.DuplicateLockException: com.liferay.portal.lock.internal.LockImpl@920c
at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.acquireLock(SerialBackgroundTaskExecutor.java:79)
at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:57)
at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:41)
at com.liferay.portal.background.task.internal.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:72)
at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:136)
at com.liferay.portal.kernel.messaging.BaseMessageListener.doReceive(BaseMessageListener.java:48)
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:34)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Resolution
- This case is similar to Constraint (IX_228562AD) violated when LDAP import on startup is on and this error message can safely be ignored.
- Portal is handling the original problem (
IX_228562AD violation) and queuing that. The ERROR is logged by Hibernate (JDBCExceptionReporter) but after this log, the portal shows the INFO message to confirm that the background task has been queued and will be executed later.
Did this article resolve your issue ?