How to verify data in Liferay Portal 6.0 or 6.1

Overview

Liferay Portal 6.0 and 6.1 provide a data verification mechanism which can be used to resolve various data integrity issues, including the following data sets:

  • Asset
  • Blogs
  • Bookmarks
  • Calendar
  • Document Library
  • Group
  • Journal
  • Layout
  • Message Boards
  • Organization
  • Permission
  • Resource Permissions
  • Role
  • Social
  • User
  • Wiki

Data Verification Usage

Data verification is configured using 2 properties:

  • verify.processes - define verification suite or process to run (fully qualified Java class name)
  • verify.frequency - define frequency for running verification suite or process (-1, 1, 0).

The default values for these properties are listed below.

One approach to the data verification process is listed below:

  1. Enable DEBUG logging for data verification processes to monitor progress and potential issues.
  2. Enable data verification process suite (or individual process)
  3. Start Liferay Portal to trigger data verification process(es)
  4. Review the data verification suite log entries for potential issues.
  5. Shutdown Liferay Portal
  6. Disable data verification process
  7. Disable DEBUG logging for data verification processes

Default Data Verification Properties

FILE: portal-impl.jar!portal.properties

##
## Verify
##

    #
    # Input a list of comma delimited class name that implement
    # com.liferay.portal.integrity.VerifyProcess. These classes will run on
    # startup to verify and fix any integrity problems found in the database.
    #
    verify.processes=com.liferay.portal.verify.VerifyProcessSuite

    #
    # Specify the frequency for verifying the integrity of the database.
    #
    # Constants in VerifyProcess:
    #     public static final int ALWAYS = -1;
    #     public static final int NEVER = 0;
    #     public static final int ONCE = 1;
    #
    verify.frequency=1

 

Enable Data Verification

To enable data verification, update the "verify.frequency" property.

NOTE: Data verification is configured to only run once, as per the default properties.

NOTE: The default data verification process is the Verify Process Suite, which in turn runs many verification processes.

Edit "PORTAL_HOME/portal-ext.properties".

Update property "verify.frequency" to always run.

   verify.frequency=-1

Enable DEBUG level logging for category "com.liferay.portal.verify" package to show additional details.

Disable Data Verification

To disable data verification, update the "verify.frequency" property.

Edit "PORTAL_HOME/portal-ext.properties".

Update property "verify.frequency" to never run.

   verify.frequency=0

Sample Data Verification Run

Sample Data Verification Environment

Host O/S: Apple Mac OS X (10.8.4)

Database: MySQL 5.5.x

Liferay Portal: Liferay Portal 6.1. EE GA2 (6.1.20)

Liferay Portal Patches: announcements-1-6120, core-5-6120, documents-and-media-2-6120, dynamic-data-lists-1-6120, hotfix-55-6120, hotfix-56-6120, message-boards-1-6120, plugin-deployment-1-6120, security-hotfix-3-6120, service-builder-1-6120, tags-and-categories-1-6120, upgrade-2-6120

Sample Data Verification Log

Log File: TOMCAT/logs/catalina.out

Starting Liferay Portal Enterprise Edition 6.1.20 EE (Paton / Build 6120 / July 31, 2012)
11:41:48,604 INFO  [pool-2-thread-1][BaseDB:455] Database does not support case sensitive queries
11:41:50,018 DEBUG [pool-2-thread-1][VerifyProcessUtil:99] Initializing verification com.liferay.portal.verify.VerifyProcessSuite
11:41:50,044 DEBUG [pool-2-thread-1][VerifyProcessUtil:107] Running verification com.liferay.portal.verify.VerifyProcessSuite
11:41:50,050 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyProcessSuite
11:41:50,052 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyProperties
11:41:50,077 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyDB2
11:41:50,078 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyMySQL
11:41:58,627 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyOracle
11:41:58,631 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifySQLServer
11:41:58,631 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyCounter
11:41:58,710 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyUUID
11:41:58,739 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyPermission
11:42:09,396 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyRole
11:42:09,402 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyAsset
11:42:09,421 INFO  [pool-2-thread-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.util.UpgradeAssetPublisherManualEntries
11:42:09,702 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyBlogs
11:42:09,778 DEBUG [pool-2-thread-1][VerifyBlogs:35] Processing 0 entries with no asset
11:42:09,778 DEBUG [pool-2-thread-1][VerifyBlogs:54] Assets verified for entries
11:42:09,779 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyBookmarks
11:42:09,783 DEBUG [pool-2-thread-1][VerifyBookmarks:35] Processing 0 entries with no asset
11:42:09,784 DEBUG [pool-2-thread-1][VerifyBookmarks:54] Assets verified for entries
11:42:09,784 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyCalendar
11:42:09,801 DEBUG [pool-2-thread-1][VerifyCalendar:73] Processing 0 events with no asset
11:42:09,801 DEBUG [pool-2-thread-1][VerifyCalendar:91] Assets verified for events
11:42:10,039 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyDocumentLibrary
11:42:10,386 DEBUG [pool-2-thread-1][VerifyDocumentLibrary:169] Processing 0 file entries with invalid version
11:42:10,387 DEBUG [pool-2-thread-1][VerifyDocumentLibrary:181] Fixed misversioned file entries
11:42:10,838 DEBUG [pool-2-thread-1][VerifyDocumentLibrary:128] Processing 464 file entries with application/octet-stream
11:42:12,250 DEBUG [pool-2-thread-1][VerifyDocumentLibrary:160] Fixed file entries with invalid mime types
11:42:12,356 DEBUG [pool-2-thread-1][VerifyDocumentLibrary:240] Processing 0 file entries with no group
11:42:12,357 DEBUG [pool-2-thread-1][VerifyDocumentLibrary:261] Removed orphaned file entries
11:42:12,905 DEBUG [pool-2-thread-1][VerifyDocumentLibrary:270] Processing 0 file entries with no asset
11:42:12,905 DEBUG [pool-2-thread-1][VerifyDocumentLibrary:296] Assets verified for file entries
11:42:12,906 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyGroup
11:42:13,009 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyJournal
11:42:13,210 DEBUG [pool-2-thread-1][VerifyJournal:76] Permissions verified for structures
11:42:13,361 DEBUG [pool-2-thread-1][VerifyJournal:91] Permissions verified for templates
11:42:41,509 DEBUG [pool-2-thread-1][VerifyJournal:157] Permissions and assets verified for articles
11:42:45,634 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyLayout
11:42:49,085 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyMessageBoards
11:42:49,106 DEBUG [pool-2-thread-1][VerifyMessageBoards:110] Processing 34 categories for statistics accuracy
11:42:50,025 DEBUG [pool-2-thread-1][VerifyMessageBoards:135] Statistics verified for categories
11:42:53,546 DEBUG [pool-2-thread-1][VerifyMessageBoards:144] Processing 39028 threads for statistics accuracy
11:43:26,735 DEBUG [pool-2-thread-1][VerifyMessageBoards:161] Statistics verified for threads
11:43:27,209 DEBUG [pool-2-thread-1][VerifyMessageBoards:50] Processing 0 messages with no asset
11:43:27,210 DEBUG [pool-2-thread-1][VerifyMessageBoards:69] Assets verified for messages
11:43:27,249 DEBUG [pool-2-thread-1][VerifyMessageBoards:77] Processing 3 threads with no asset
11:43:27,253 WARN  [pool-2-thread-1][UserPersistenceImpl:965] No User exists with the primary key 80028
11:43:27,255 WARN  [pool-2-thread-1][VerifyMessageBoards:92] Unable to update asset for thread 96224: No User exists with the primary key 80028
11:43:27,260 WARN  [pool-2-thread-1][UserPersistenceImpl:965] No User exists with the primary key 80028
11:43:27,261 WARN  [pool-2-thread-1][VerifyMessageBoards:92] Unable to update asset for thread 96234: No User exists with the primary key 80028
11:43:27,265 WARN  [pool-2-thread-1][UserPersistenceImpl:965] No User exists with the primary key 80028
11:43:27,265 WARN  [pool-2-thread-1][VerifyMessageBoards:92] Unable to update asset for thread 129431: No User exists with the primary key 80028
11:43:27,266 DEBUG [pool-2-thread-1][VerifyMessageBoards:100] Assets verified for threads
11:43:27,267 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyOrganization
11:43:27,269 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyResourcePermissions
11:43:27,270 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifySocial
11:43:27,271 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyUser
11:43:27,311 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyWiki
11:43:29,693 DEBUG [pool-2-thread-1][VerifyWiki:34] Processing 0 pages with no asset
11:43:29,694 DEBUG [pool-2-thread-1][VerifyWiki:52] Assets verified for pages
11:43:29,695 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyWorkflow
11:43:29,696 DEBUG [pool-2-thread-1][VerifyProcessUtil:113] Finished verification com.liferay.portal.verify.VerifyProcessSuite

References