Deleting the internal Derby RunTimeCacheDB in Linux/UNIX OM Web Viewer 12.1
search cancel

Deleting the internal Derby RunTimeCacheDB in Linux/UNIX OM Web Viewer 12.1

book

Article ID: 228695

calendar_today

Updated On:

Products

Output Management Web Viewer

Issue/Introduction

Broadcom Support recommended deleting the internal the Derby RunTimeCacheDB in Linux/UNIX for 12.1 Web Viewer. How to do this?

Environment

  • Output Management Web Viewer 12.1
  • Apache Derby
  • Db2

Cause

Using the Web Viewer supplied Internal Derby database for production is not just not recommended, it is discouraged.  You may be instructed to try recovering a stressed Derby Database if you see errors like these: 

ERROR 17 Nov 2021 08:28:45,441 [https-openssl-nio-8443-exec-124] com.ca.erm.webviewer.cache.RLDBAccess:   ----- SQLException -----
ERROR 17 Nov 2021 08:28:45,441 [https-openssl-nio-8443-exec-124] com.ca.erm.webviewer.cache.RLDBAccess:   SQL State:  40XL1
ERROR 17 Nov 2021 08:28:45,441 [https-openssl-nio-8443-exec-124] com.ca.erm.webviewer.cache.RLDBAccess:   Error Code: 30000
ERROR 17 Nov 2021 08:28:45,441 [https-openssl-nio-8443-exec-124] com.ca.erm.webviewer.cache.RLDBAccess:   Message:    A lock could not be obtained within the time requested
ERROR 17 Nov 2021 08:28:45,441 [https-openssl-nio-8443-exec-124] com.ca.erm.webviewer.cache.RLDBAccess:   Stack:      
java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)

The true solution is to use a third party DB (DB2, MSSQL, or Oracle) for a production application of OM Web Viewer 12.1

Resolution

You should only perform these steps when so instructed by Broadcom Support. For the recommendation to delete the RunTimeCacheDB, the /database Directory for the Web Viewer Derby database should have the following entries:
 
drwxr-xr-x   5 <local user> <group>  8192 Jul 27 12:30 AdminDB
drwxr-xr-x   5 XXXXX01  OMVSGRP     8192 Jul 27 12:31 RunTimeCacheDB

You should only delete the RunTimeCacheDB with the option to delete all subdirectories and files as well, aka "rm -R <path>/RunTimeCacheDB" (no quotes).  It will be regenerated immediately when Tomcat or WebSphere is running again, and does not affect any application preferences/user information that resides under the /AdminDB Directory. 
 
The location of these directories is usually either under the 
<CAOMWV12_HOME>/database 
or
<CAOMWV12_HOME>/<Apache Tomcat path>/webapps/CAOMWebViewer12/database
 
For PC or z/Linux, it could be elsewhere however.

Additional Information

If urged to work using DB2, MSSQL, or Oracle (whichever you may be available to your site), you should be aware of what data you might salvage from Derby. The Web Viewer application does have the ability to export several areas, but not all of the existing Derby database, except if you switch to DB2 - where Web Viewer has a process available to Export the entire Derby Database and import it into a DB2 database: Need Conversion from Internal Database to DB2