WebCenter Sites NIO Conversion Utility on JCS

 

To download this article as a pdf click here

 

Introduction

WebCenter Sites installation procedure requires a Shared File System, e.g. NFS disk. JCS does not support a Shared File System. Hence for installation of WebCenter Sites on JCS first the primary cluster member is installed using local disk as a shared disk. Then the shared file system is moved to NIO1 file system on Oracle Database. Subsequently, the secondary cluster members are installed.

The NIO file system can use the same database as used by WebCenter Sites repository, or it can use a different database. This article describes setting up NIO file system in database using the same repository as WebCenter Sites. If you want to install NIO filesystem in a separate repository the procedure is given here2.

The NIO conversion utility is only supported for Oracle database.

 

Before Running NIO Conversion

Before running the NIO Conversion utility, you must have successfully installed primary cluster member of WebCenter Sites on JCS. When you are ready to run the utility, you should note the following:

 

1)  The <WCSITES_CONFIG_DIR> is located at DOMAIN_HOME/wcsites/wcsites/config/. Back up the config directory. In case of any failures you can roll back changes made to the config folder.

 

2)  Note the location of shared file system. During WebCenter Sites’ installation on JCS, you must have specified the location of shared file system. In JCS, for the single cluster member install, the shared file system must be specified as a folder on local file system. If you do not remember the location of shared file system, you can look it up in the <WCSITES_CONFIG_DIR>/wcs_properties.json file by searching for “wcsites.shared”.

Look for the value of key wcsites.shared as follows:

“key” : “wcsites.shared”, “value” : “/u01/data/share/”,

 

3) The default data source name is <prefix>_wcsitesDS. The <prefix> is as specified when running the RCU utility during WebCenter Sites installation. If you want to use a different data source name, you must set the databaseConnector bean in <WCSITES_CONFIG_DIR>/ NIOSharedServices.xml to the new name.

 

4) Note the JDCS Connection URL. You can get this from Weblogic Console:

WLimage

If you are installing NIO filesystem in the same database as WebCenter Sites repository, the JDBC Connection URL for WebCenter Sites and NIO database will be same.

 

5) Set the JDBC connection URL in the NIOConversionServices.xml file located at <WCSITES_CONFIG_DIR>. Specify the DB parameters for your database by updating both the databaseConnector bean and the sitesDatabaseConnector bean with your DB information. The beans will only be different if you plan to store the Sites shared file system table (‘WCS_SHAREDFILESYSTEM’) in a separate database from the WebCenter Sites database. For example:

<!– Specify connection information for your shared filesystem DB –> <bean id=“databaseConnector” class=”oracle.sites.nio.filesystem.database.SimpleDatabaseConnector”

scope =”prototype” >
<property name=”databaseTable” value=”WCS_SHAREDFILESYSTEM” /> <property name=”databaseDriverClass”

value=”oracle.jdbc.OracleDriver” />
<property name=”databaseUrl” value=”jdbc:oracle:thin:@//WCS-DBCS:

1521/PDB1.ravello.oraclecloud.internal” />
<property name=”userName” value=”WCS_WCSITES” />

</bean>

<!– Specify connection information for your Sites DB, which may or may not be identical to the shared filesystem database above –> <bean id=“sitesDatabaseConnector” class=”oracle.sites.nio.filesystem.database.SimpleDatabaseConnector”

scope =”prototype” >
<property name=”databaseTable” value=”WCS_SHAREDFILESYSTEM” /> <property name=”databaseDriverClass”

value=”oracle.jdbc.OracleDriver” />
<property name=”databaseUrl” value=”jdbc:oracle:thin:@//WCS-DBCS:

1521/PDB1.ravello.oraclecloud.internal” />
<property name=”userName” value=”WCS_WCSITES” />

</bean>

 

6) Move <WCSITES_CONFIG_DIR>/wcs_properties.json file to share folder

7) Make sure ojdbc6.jar is present in the the system and note the folder it is present in.

8) Shut down all Weblogic servers including the admin server and managed servers.

 

Running NIO Conversion Utility

NIO Conversion utility is used to move the shared filesystem to database. It can also be used to revert the shared file system from NIO Database back to NFS.

NIOConversion utility is present at $MIDDLEWARE_HOME/wcsites/webcentersites/sites-home/ bin folder

Run the conversion script as follows:

cd SITES_HOME/bin

./nioconversion.sh <sites-home_directory> <sites_config_directory> <sites_shared_directory> convert|revert <database_driver_file>.

On a Windows operating system, use the nioconversion.bat command, with the same options.

The following table describes the options of this script.

 

Parameter

Description

convert or revert

Converts the shared file system to database storage, or reverts it back to disk storage.

sites- home_directory

Full path to the sites-home directory. By default, this is MIDDLEWARE_HOME/wcsites/webcentersites/sites-home.

sites_config

Full path to the WebCenter Sites config directory, with no trailing slash. By default, this is DOMAIN_HOME/wcsites/ wcsites/config

sites_shared_dire ctory

Full path of the WebCenter Sites shared file system directory

database_driver_ file

Full path and name of the database driver file used for connecting to the target database.

silent (optional)

This flag minimizes messages to the console

 

Do not supply symbolically linked paths to the conversion utility, or the conversion will fail.

Once the utility executes, it will prompt you for the password for both the WebCenter Sites database and database for the shared file system. The passwords will only be different if you have the shared file system database separate from the WebCenter Sites database.

The NIO Conversion Utility will replicate the shared file system into the database and update all configuration files (ini/database tables) to reference the file system in the database.

The log file for the utility is called ‘nio.conversion.log’. It will be created in the SITES_HOME/bin directory.

UNIX example:

./nioconversion.sh /u01/app/oracle/middleware/wcsites/webcentersites/sites-home /u01/data/domains/WCSJCSer_domain/wcsites/wcsites/config /u01/data/share convert /u01/app/oracle/middleware/oracle_common/modules/oracle.jdbc/ojdbc6.jar

Note: It is required that all instances of WebCenter Sites be shutdown
otherwise the conversion will leave you with an unstable system!

Please confirm All instances have been shutdown? [y/n]y

Proceeding!

Are you sure you wish to proceed with conversion?
Are you sure? [y/n]y

Proceeding with conversion

Please enter the WC Sites database password:

4144 files copied.
Updating system tables to use the database filesystem.
End of NIO Utility

 

Verifying NIO Conversion

To verify that NIO Conversion is successful, do the following:

1)  Rename the old share directory.Locate the old shared file system directory on the disk and rename it – do not delete it yet.

 

2)  Start the WebCenter Sites Managed Server. Make sure that the Weblogic and WebCenter Sites is running properly. If this is the WebCenter Sites Editorial system, log in to the Admin interface to verify that the new configuration is fully functional.

 

3)  Confirm that the old shared file system directory on disk was not re-created after WebCenter Sites started up. If the directory was re-created, check for any custom code that might still be referencing it.

 

4)  If the old shared file system directory on disk was not re-created after WebCenter Sites is running properly, then NIO Conversion is successful. You should back up the old shared directory for archival purposes, and then delete it from the system.

 

Reference:

1: WebCenter Sites supports NIO as per original JSR 203. It does not support NIO.2

2: Moving Shared File System to Database: https://docs.oracle.com/middleware/1221/core/WBCSI/GUID-DB67D20A-2232-42FE-B5A7-C77298E5A590.htm#WBCSI-GUID-DB67D20A-2232-42FE-B5A7-C77298E5A590

 

 

To download this article as a pdf click here.

Add Your Comment