John Rickett commented on Mar 6, 2013

Re: Deleting a web content library

An APAR PM78440 was shipped in Portal-WCM Combined Cumulative Fix to support deletion of all libraries using a ConfigEngine task. Here are the contents of the APAR that include the instructions:

MODULE TO DELETE MULTIPLE WEB CONTENT MANAGER LIBRARIES

ERROR DESCRIPTION

About deleteMultipleLibraries task

----------------------------------

DeleteMultipleLibraries task can delete a set of libraries or

all libraries on the system depending on the option selected.

Important points to be noted before running the task:

You MUST back up your database prior to running the module. The

module must only be run by the server administrator.

When deleting ALL the libraries, the module will do the

following postprocessing steps required to maintain the

integrity of your server.

1. Clear all internal caches.

2. Cancel all scheduled tasks.

3. Clear recent/favourite items.

4. Clear event log.

5. Clear temporary resources directory used by WCM, auto saved

text and holding directories.

NOTE: Once all libraries are deleted successfully, the default

"Web Content" library will be recreated and populated with the

default content. This is done so that users can do a quick

content creation check to ensure integrity of their server. If

required, this library can be deleted from the admin ui in

seconds.

Configuring steps for the task

------------------------------

Update WCM configuration

1. Edit WCMConfigService.properties file in

/WebSphere70/wp_profile/PortalServer/wcm/shared/app/config/wcmse

rvices

2. Search for the line starting with

"connect.businesslogic.module", uncomment the line and add

deleteMultiplelibraries to the end of the comma seperated list

so that the line looks as follows.

connect.businesslogic.module=web,mail,default,ajpe,federatedprox

y,ajpecatselect,memberfixer,workflowenablement,itemdispatcher,pl

utouploadfile,plutodownloadfile,synd,subs,syndication,refreshall

items,unlocklibrary,custom,data,clearversions,clearhistory,reset

eventlog,deletemultiplelibraries

3. Search for "Utility Modules - END" in the file and paste the

following 3 lines above the comment line.

# Delete Multiple Libraries module

connect.businesslogic.module.deletemultiplelibraries.class=com

.aptrix.pluto.util.DeleteMultipleLibrariesModule

connect.businesslogic.module.deletemultiplelibraries

.remoteaccess=true

connect.businesslogic.module.deletemultiplelibraries

.autoload=false

4. Save the config file.

5. Run the following config task.

./ConfigEngine.sh update-wcm-service-properties

6. Run the following config task to update the wcm ear (after

backing up any JSPs that you may have in the WCM war

directories).

./ConfigEngine.sh update-wcm

7. Restart the server.

Running the task

-----------------

(I) Deleting all libraries

Navigate to /opt/WebSphere70/wp_profile/ConfigEngine directory

and run the following config task.

./ConfigEngine.sh run-wcm-admin-task-delete-libraries

-DdeleteOption=all -DPortalAdminId=username

-DPortalAdminPwd=password

The execution time for the task depends on the size of your data

set. You should see a "Build Successful" message once the task

has completed. Please check SystemOut.log file for progress

messages. If you do not wish to run the post processing steps,

you can do so by setting the postprocess option to false as

specified below. Please note that this is not recommended and

must only be done in consultation with IBM Level3 Support.

./ConfigEngine.sh run-wcm-admin-task-delete-libraries

-DdeleteOption=all -Dpostprocess=false -DPortalAdminId=username

-DPortalAdminPwd=password

However, please note that if the module does not execute the

post processing steps, then you will have to do the following in

order to maintain the integrity of your system

1. Restart the server.

2. Clear the event log.

3. Cancel the ejb timer taks for WCM application.

(II) Deleting selected libraries

Navigate to /opt/WebSphere70/wp_profile/ConfigEngine directory

and run the following config task.

./ConfigEngine.sh run-wcm-admin-task-delete-libraries

-DdeleteOption=selected -Dlibraries=library1,library2

-DPortalAdminId=username -DPortalAdminPwd=password

The execution time for the task depends on the size of your data

set. You should see a "Build Successful" message once the task

has completed. Please check SystemOut.log file for progress

messages.

If the libraries that you have specified have references to

items in them from other libraries that are not being deleted,

then the libraries will not be deleted. SystemOut.log will have

statements of the following format that will provide the list of

references that need to be cleared or replaced before these

libraries can be deleted.

DeleteMultipl I DeleteMultiLib:: BEGIN List of references that

are preventing libraries from being deleted.

DeleteMultipl I DeleteMultiLib:: Reference TO

::/cmpntlib1/shorttext_9 in the deleted library FROM :

/contentlib7/sa7/sa71/sa712/sa7123/ sa71234/sa712345/sa7123456/sa

71234567/content1_sa71234567/ibmcontentwcm:elements[3]/ibmconten

twcm:sourceContent

DeleteMultipl I DeleteMultiLib:: Reference TO

::/cmpntlib1/shorttext_2 in the deleted library FROM :

/contentlib2/sa3/sa31/sa312/sa3123/ sa31234/sa312345/sa3123456/sa

31234567/sa312345678/sa3123456789/1356c51e-609e-415d-a553-264c2e

ad3d96/ibmcontentwcm:elements[4]/ibmcontentwcm:sourceContent

DeleteMultipl I DeleteMultiLib:: END Listing references in 1000

milliseconds.