Clarity: Upgrade falls over with "DB Connection failure" error
search cancel

Clarity: Upgrade falls over with "DB Connection failure" error

book

Article ID: 50885

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

Description:

Verified in NSA that the database connections settings are all ok and health report does not complain about the connectivity to the database.

Despite that when an upgrade is performed, following error stops upgrade to successfully complete.

Install.log:-

6/21/10 3:25 PM (ExecTask) - Invalid lookup type: CUSTRNWS_AGREE_FORMAT
6/21/10 3:25 PM (ExecTask) ERROR 2010-06-21 15:25:16,280 [main] lookup.LookupTypeCache Invalid lookup type: CUSTRNWS_AGREE_FORMAT
6/21/10 3:25 PM (ExecTask) - Exception due to DB Connection failure
6/21/10 3:25 PM (ExecTask) ERROR 2010-06-21 15:25:28,441 [main] persistence.PersistenceControllert Exception due to DB Connection failure
6/21/10 3:25 PM (ExecTask) - Internal Processing exception
6/21/10 3:25 PM (ExecTask) com.niku.union.persistence.DBConnectionException: com.ca.clarity.jdbc.base.BaseBatchUpdateException: [CA Clarity][Oracle JDBC Driver]Communication error: The stream provided does not contain the number of bytes specified. For batches, please ensure that streams are reset before subsequent addBatch calls. This is a non-recoverable error and the connection has been terminated.
6/21/10 3:25 PM (ExecTask) at com.niku.union.persistence.PersistenceController.handleSQLException(PersistenceController.java:1818)
6/21/10 3:25 PM (ExecTask) at com.niku.union.persistence.PersistenceController.processSql(PersistenceController.java:2334)
6/21/10 3:25 PM (ExecTask) at com.niku.union.persistence.PersistenceController.processStatement(PersistenceController.java:701)
6/21/10 3:25 PM (ExecTask) at com.niku.union.persistence.PersistenceController.processStatements(PersistenceController.java:610)

6/21/10 3:25 PM (ExecTask) Caused by: com.ca.clarity.jdbc.base.BaseBatchUpdateException: [CA Clarity][Oracle JDBC Driver]Communication error: The stream provided does not contain the number of bytes specified. For batches, please ensure that streams are reset before subsequent addBatch calls. This is a non-recoverable error and the connection has been terminated.

6/21/10 3:25 PM (ExecTask) ERROR 2010-06-21 15:25:28,441 [main] niku.xql2 Internal Processing exception
6/21/10 3:25 PM (ExecTask) com.niku.union.persistence.DBConnectionException: com.ca.clarity.jdbc.base.BaseBatchUpdateException: [CA Clarity][Oracle JDBC Driver]Communication error: The stream provided does not contain the number of bytes specified. For batches, please ensure that streams are reset before subsequent addBatch calls. This is a non-recoverable error and the connection has been terminated.

6/21/10 3:25 PM (ExecTask) Caused by: com.ca.clarity.jdbc.base.BaseBatchUpdateException: [CA Clarity][Oracle JDBC Driver]Communication error: The stream provided does not contain the number of bytes specified. For batches, please ensure that streams are reset before subsequent addBatch calls. This is a non-recoverable error and the connection has been terminated.

6/21/10 3:25 PM (ExecTask) Error processing xbl object/bootstrapFilters.xbl
6/21/10 3:25 PM (ExecTask) Upgrading views for object project
6/21/10 3:25 PM (ExecTask) - Failed to determine analytic function support
6/21/10 3:25 PM (ExecTask) java.lang.RuntimeException: Unexpected invocation exception: [CA Clarity][Oracle JDBC Driver]Object has been closed.

Solution:

  1. Prior to running an upgrade, from the Clarity GUI Application - Reports and Jobs menu, run Oracle Analyze job.

  2. If a user cannot logon to Clarity Application, then Please consult your DBA to perform the following tasks.

    1. Run ANALYZE on the Database server for CLARITY schema.

    2. Optionally, you may like to rebuild the indexes on data within Clarity database tables prior to running Oracle ANALYZE.

The query below will generate output that can be run as a script to rebuild all the indexes in a given Oracle schema. It will need to be edited to reflect your schema name and object prefix.

THE QUERY BELOW WILL NEED TO BE EDITED TO REFLECT YOUR ORACLE ENVIRONMENT (requires 2 edits)

select 'alter index CLARITY_SCHEMA_NAME_GOES_HERE.' || index_name || 'rebuild;' from (select index_name from all_indexes where owner ='DATABASE_USERNAME_GOES_HERE')

The output from the above will look something like this:

alter index CLARITY_SCHEMA_NAME_GOES_HERE.ODF_SL_CST_DTL_COST_U2 rebuild;alter index CLARITY_SCHEMA_NAME_GOES_HERE.ODF_SL_CST_DTL_COST_U1 rebuild;alter index CLARITY_SCHEMA_NAME_GOES_HERE.ODF_SL_CST_DTL_COST_N1 rebuild;alter index CLARITY_SCHEMA_NAME_GOES_HERE.ODF_SSL_CST_DTL_COST_U1 rebuild;alter index CLARITY_SCHEMA_NAME_GOES_HERE.ODF_SSL_CST_DTL_COST_N1 rebuild;

Save the output to a file and run it as a script against the Clarity database.

We strongly recommend you try this on a non-productive environment first.

OR a small database procedure can be written as follows and run it.

             CREATE OR REPLACE PROCEDURE "CLARITY"."C_REINDEX" (P_JOB_RUN_ID    IN             NUMBER, P_JOB_USER_ID   IN   NUMBER) AS                           vStmt     VARCHAR2(200);                           CURSOR C_CURSOR IS select index_name, tablespace_name from user_indexes where                                          index_name not like 'SYS%'  and TABLESPACE_NAME IS NOT NULL order by index_name;                          BEGIN                         FOR C_REC IN C_CURSOR                                 LOOP                          vStmt := 'Alter index CLARITY.'||C_REC.index_name||' rebuild';                          vStmt := vStmt||CHR(13);                          vStmt := vStmt||' TABLESPACE '||C_REC.tablespace_name;               EXECUTE IMMEDIATE (vStmt);

Keywords: CLARITYKB, installation, configuration, implementation.

Environment

Release: ESPCLA99000-12.1-Clarity-Extended Support Plus
Component: