legacy-knowledge-base
公開されました Jun. 30, 2025

Style books error ORA-00904: "MVCCVERSION": invalid identifier_

written-by

Daniel Martinez Cisneros

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

learn-legacy-article-disclaimer-text

Issue

When attempting to create or import a Style Book, the following error appears in the logs:
ORA-00904: "MVCCVERSION": invalid identifier.

Environment

  • DXP 7.3 SP3
  • DXP 7.4 Update 4

Resolution

This issue occurs because the STYLEBOOKENTRY and STYLEBOOKENTRYVERSION database tables were not successfully upgraded. The root cause is linked to the missing MVCCVERSION column, which was not added due to the bug described in https://liferay.atlassian.net/browse/LPS-127285

To resolve this issue, follow one of the two approaches below:

  1. Re-run the Upgrade Process
    Ensure that LPS-162305 is applied in your environment, then perform the upgrade again. This will correctly add the missing MVCCVERSION column.
  2. Add the Missing Columns: if re-running the upgrade is not feasible, use the following Groovy script to manually add the missing MVCCVERSION columns to the affected tables:
import com.liferay.portal.kernel.dao.jdbc.DataAccess;

import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;

out.print("SQL update script for fix column \n")
out.print("--------------------------------------------------------\n")

Connection connection = DataAccess.getConnection();

String[] tables = ["styleBookEntry","styleBookEntryVersion"];

for(String table : tables){
sql = "ALTER TABLE "+ table + " ADD COLUMN mvccVersion int8 default 0 NOT NULL";
try{
Statement stmt = connection.createStatement();

out.print("\nSQL: "+sql);
stmt.executeUpdate(sql);

}catch(Exception e){
out.print("\n\tWarning: table not found: " + e);
}
}


out.print("--------------------------------------------------------\n")
out.println("\n\nEND OF SCRIPT");

Additional information

  • Ensure you back up your database before applying any changes.
  • After adding the columns, test the functionality to confirm the issue is resolved.
  • By following these steps, you should be able to successfully create or import Style Books without encountering the MVCCVERSION error.
  • Article about similar error updating to 7.4

 

did-this-article-resolve-your-issue

legacy-knowledge-base