Laserfiche Search Index Catalog Upgrade Fails When Repository Information Includes Spaces Or Special Characters

July 21, 2011 | KB: 1012724
Laserfiche 8.2

Summary

When upgrading your search catalog from Laserfiche 8.0 or 8.1 to Laserfiche 8.2, the search catalog upgrade may fail if repository information (such as the database name) contains spaces or special characters. The following error will be reported in the log file:

The application failed to start. The syntax of the command or the configuration files is incorrect

The following error may be received from the Laserfiche Server when it attempts to access the index catalog:

The search engine encountered an internal error. Please check the search engine error log for more details. [9132]

Cause

The reindexing step of the search catalog upgrade uses the quick reindex utility, which does not correctly escape spaces and special characters. When those characters are encountered, the upgrade will fail. This affects only full-text search and indexing, and does not affect any other repository functionality.

Resolution

This issue is resolved in the version of the quick reindex utility included in Laserfiche 8.2 installation packages released on February 7, 2011 or later with a setup.exe of version 8.2.0.622 or higher. If you have not yet performed the upgrade, please download the most recent version of the Laserfiche 8.2 installation.

Please see the following Knowledge Base article:

1012746 List of Changes for Laserfiche 8.2.0 Cumulative Hotfix (February 2011).

Workaround 1

Use a script file to automatically re-run the search catalog upgrade.

Note: This helper script will correctly re-run the search catalog upgrade if your repository information contains a space or any special character except the double quote (") character. If your repository information contains a double quote, see Workaround 1 for information on re-running the search catalog manually.

  1. Download the search catalog upgrade tool helper: KB_1012724.zip
  2. Extract the zip file and copy the UpgradeToolHelper.bat file.
  3. On the computer the Laserfiche Server is installed on, navigate to your Laserfiche Server installation directory. In most cases, this will be C:\Program Files\Laserfiche\Server.
  4. Paste the search catalog upgrade tool helper into the Server installation directory.
  5. Important: The search catalog upgrade tool helper must be copied into the Laserfiche Server installation directory and then run from that location using a command line interface. It will not operate correctly when run from any other location.

  6. Open a command line interface. In most Windows installations, you can open the command line by opening the Start menu and selecting Accessories and then Command Prompt.
  7. In the command line, navigate to the Laserfiche Server installation directory.
  8. Type the following and press ENTER:

    UpgradeToolHelper.bat

  9. Follow the instructions in the search catalog upgrade tool helper to upgrade your search catalog.

Workaround 2

Manually re-run the reindexing step of the search catalog upgrade with spaces and special characters escaped.

  1. Stop the Laserfiche Full-Text Search and Indexing Service:
    1. Open the Laserfiche Administration Console.
    2. Right-click the node for your Laserfiche Server.
    3. Point to All Tasks.
    4. Select Stop Search Service.
  2. In Windows, click the Start button. Navigate to Accessories and open Command Prompt.
  3. In the command prompt, navigate to the folder that contains the Quick Reindexer (QRcmd.exe). This is usually your Server installation folder, C:\Program Files\Laserfiche\Server.
  4. Type the following:

    QRcmd.exe -t DBType -p "SearchFolderPath" -s "SQLServerName" -r "SQLDatabaseName" -u "UserName" -w "UserPassword" -catalogLanguage LanguageCode -msgLang LanguageCode -b "BackupPath" -l "LogPath"

    where DBType is the type of your Database Management System (MSSQL or Oracle), SearchFolderPath is the path to the SEARCH8 folder in your repository directory (including the folder itself), SQLServerName is the name of your Microsoft SQL Server or Oracle server computer, SQLDatabaseName is the name of your Microsoft SQL Server database (this value should be left blank for Oracle), UserName is the name of the SQL user that will authenticate to the SQL Server, UserPassword is the password for the specified user (if no user name or password are provided, the utility will authenticate using the credentials of the user who launched it) LanguageCode is the two-letter abbreviation of the language that will be used for indexing and error codes (for instance, en for English, or fr for French), BackupPath is the path to the folder in which the backup of your catalog will be saved, and LogPath is the path to the log file you want to save, including the log name itself.

    Example: John is performing a manual reindex of his search catalog. His repository's directory is C:\Repositories\My Repository, and uses the database "My Repository", hosted on the MSSQL server "MyServer". He will authenticate using his own Windows credentials. He will be indexing in English. He wants to store the backup at C:\Backups\ and the log file at C:\Logs. He would use the following syntax:

    QRcmd.exe -t MSSQL -p "C:\Repositories\My Repository\SEARCH8" -s "MyServer" -r "My Repository" -catalogLanguage en -msgLang en -b "C:\Backups" -l "C:\Logs\ReindexLog.log"

    Important: All strings that include spaces or special characters must be escaped with double quotes, as in the example above. If you fail to enclose a string containing one of these character types in quotes, the reindex may fail again. If the string itself contains quotes, they must be escaped with the backslash character. For example, a database with the following name:

    Human Resources "HR" Repository

    would be escaped as below:

    "Human Resources \"HR\" Repository"

  5. Press Enter to send the command and start the utility.
  6. When the utility has successfully completed, re-start the Laserfiche Full-Text Search and Indexing Service:
    1. Open the Laserfiche Administration Console.
    2. Right-click the node for your Laserfiche Server.
    3. Point to All Tasks
    4. Select Start Search Service.