search cancel

How to delete internal Derby RunTimeCacheDB in Linux/Unix - 12.1 Web Viewer


Article ID: 228695


Updated On:


Output Management Web Viewer


Broadcom Support recommended I delete internal the Derby RunTimeCacheDB in Linux/Unix for 12.1 Web Viewer. How do I do this?


Release : 12.1



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]   ----- SQLException -----
ERROR 17 Nov 2021 08:28:45,441 [https-openssl-nio-8443-exec-124]   SQL State:  40XL1
ERROR 17 Nov 2021 08:28:45,441 [https-openssl-nio-8443-exec-124]   Error Code: 30000
ERROR 17 Nov 2021 08:28:45,441 [https-openssl-nio-8443-exec-124]   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]   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 12.1 Web Viewer.


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 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 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>/<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.