Legacy Knowledge Base
Published Sep. 10, 2025

StaleStateException Error During Startup with OpenID Connect Configuration

Written By

Tímea Bihari

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

During a Liferay DXP startup, the following error message appears in the logs, related to OpenID Connect provider configuration:

ERROR [...][BatchingBatch:139] HHH000315: Exception executing batch [org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; statement executed: update OAuthClientASLocalMetadata set mvccVersion=?, modifiedDate=? where oAuthClientASLocalMetadataId=? and mvccVersion=?], SQL: update OAuthClientASLocalMetadata set mvccVersion=?, modifiedDate=? where oAuthClientASLocalMetadataId=? and mvccVersion=?

This error does not seem to affect the functionality of the OpenID Connect SSO.

 

Environment

  • Quarterly Releases

 

Resolution

The error is caused by a deprecated class, OpenIdConnectProviderPortalInstanceLifecycleListener, which attempts to run an update on startup. This issue is specifically triggered by having an OpenID Connect (OIDC) provider configuration set at the SYSTEM scope (under Control Panel > System Settings).

While the error is generally harmless and can be ignored, the recommended solution is to move the configuration from the SYSTEM scope to the INSTANCE scope. Using SYSTEM scope for OIDC is a deprecated practice and is no longer supported in recent Liferay versions.

 

Did this article resolve your issue ?

Legacy Knowledge Base