TIBCO Administrator or AppManage fails with "java.io.IOException: Stream closed" exception while deploying/undeploying an application in the domain.

TIBCO Administrator or AppManage fails with "java.io.IOException: Stream closed" exception while deploying/undeploying an application in the domain.

book

Article ID: KB0074855

calendar_today

Updated On:

Products Versions
TIBCO Administrator 5.7.0 and above
Not Applicable -

Description

Resolution:
Description:
==========

TIBCO Administrator or AppManage fails with "java.io.IOException: Stream closed" exception while deploying /undeploying an application in the domain.


Symptoms:
========

This issue happens when an Database is used for Administrator Domain storage and has the following symptoms:

1). The redeployment of an application using Administrator GUI fails with "Stream closed" error and following exception is logged in Administrator.log .

With native Oracle DB drivers we get
###############################################################################################################
Caused by: java.io.IOException: Stream closed
    at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:134)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
    at com.tibco.pof.entitystore.db.DBBinaryStream.read(DBBinaryStream.java:144)
    at com.tibco.archive.helpers.ApplicationArchiveFactory.getOutputStream(ApplicationArchiveFactory.java:174)
    at com.tibco.archive.helpers.ApplicationArchiveFactory.getBytes(ApplicationArchiveFactory.java:187)
    at com.tibco.pof.admindomain.impl.DefaultFileContent.getInputStream(DefaultFileContent.java:148)
    at com.tibco.pof.admindomain.impl.DeploymentConfigurationImpl.char(DeploymentConfigurationImpl.java:1168)
###############################################################################################################

With  native DB2 driver we get
###############################################################################################################
End of stream prematurely reached while reading InputStream, parameter #1.  Remaining data has been padded with 0x0. ERRORCODE=-4225, SQLSTATE=null

Caused by: com.ibm.db2.jcc.b.SqlException: [jcc][t4][2039][11162][3.50.152] End of stream prematurely reached while reading InputStream, parameter #1.  Remaining data has been padded with 0x0. ERRORCODE=-4225, SQLSTATE=null
    at com.ibm.db2.jcc.b.wc.a(wc.java:55)
    at com.ibm.db2.jcc.b.wc.a(wc.java:102)
    at com.ibm.db2.jcc.t4.gb.a(gb.java:631)
    at com.ibm.db2.jcc.t4.jb.a(jb.java:1474)
    at com.ibm.db2.jcc.t4.jb.a(jb.java:150)
    at com.ibm.db2.jcc.t4.tb.a(tb.java:157)
    at com.ibm.db2.jcc.b.uk.a(uk.java:2319)
    at com.ibm.db2.jcc.b.uk.e(uk.java:2957)
    at com.ibm.db2.jcc.b.uk.zb(uk.java:568)
    at com.ibm.db2.jcc.b.uk.executeUpdate(uk.java:551)
    at com.tibco.pof.entitystore.db.InputStreamsAndDB.updateStream(InputStreamsAndDB.java:276)
    at com.tibco.pof.entitystore.db.DBInputStreamObjectFactory.helper(DBInputStreamObjectFactory.java:62)
    ... 18 more

###############################################################################################################

With native MS SQL Driver we get
###############################################################################################################
Error [com.tibco.administrator.command.data.application.Application] AESDKJ-0000 [main]  com.tibco.pof.entity.EntityStoreException: com.microsoft.sqlserver.jdbc.SQLServerException: The stream value is not the specified length. The specified length was 2,485, the actual length is 0.
    at com.tibco.pof.entitystore.db.DBInputStreamObjectFactory.helper(DBInputStreamObjectFactory.java:78)
    at com.tibco.pof.entitystore.db.DBInputStreamObjectFactory.create(DBInputStreamObjectFactory.java:84)
    at com.tibco.pof.entitystore.AbstractEntityTransaction.update(AbstractEntityTransaction.java:380)
    at com.tibco.pof.entitystore.AbstractEntityTransaction.commitHelper(AbstractEntityTransaction.java:698)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The stream value is not the specified length. The specified length was 2,485, the actual length is 0.
###############################################################################################################

With TIBCO DataDirect Add-On 1.0.0
###############################################################################################################
Caused by: java.sql.SQLException: [tibcosoftwareinc][Oracle JDBC Driver][tibcosoftwareinc][Oracle JDBC Driver]The input stream contained a different number of bytes than specified.
               at tibcosoftwareinc.jdbc.oraclebase.ddb7.b(Unknown Source)
               at tibcosoftwareinc.jdbc.oraclebase.ddb7.a(Unknown Source)
               at tibcosoftwareinc.jdbc.oraclebase.ddb6.b(Unknown Source)
               at tibcosoftwareinc.jdbc.oraclebase.ddb6.a(Unknown Source)
               at tibcosoftwareinc.jdbc.oracle.ddf.&ltinit>(Unknown Source)
               at tibcosoftwareinc.jdbc.oracle.ddk.a(Unknown Source)
               at tibcosoftwareinc.jdbc.oracle.ddk.a(Unknown Source)
               at tibcosoftwareinc.jdbc.oracle.ddk.a(Unknown Source)
               at tibcosoftwareinc.jdbc.oracle.ddk.p(Unknown Source)
               at tibcosoftwareinc.jdbc.oraclebase.ddej.v(Unknown Source)
              at tibcosoftwareinc.jdbc.oraclebase.ddej.x(Unknown Source) at tibcosoftwareinc.jdbc.oraclebase.dddc.executeUpdate(Unknown Source) at               com.tibco.pof.entitystore.db.InputStreamsAndDB.updateStream(InputStreamsAndDB.java:276)
              at com.tibco.pof.entitystore.db.DBInputStreamObjectFactory.helper(DBInputStreamObjectFactory.java:62)
###############################################################################################################




2). This application cannot be undeployed or deleted after the "java.io.IOException: Stream closed" error is seen on Admin GUI.

Cause:
======

This issue  occurs due to an  existing  JIRA defect(TRA-2488) filed for pof layer in TRA 5.7.0 and TRA 5.7.1 . Deploying and undeploying sometimes corrupts the last deployment configuration of an application.

Resolution:
=========

This issue had been addressed in TRA 5.7.0 hotfix-01 (refer LBN1-C6F2SY) and TRA 5.7.1 hotfix-02 (refer LBN1-C4I3ZA).

Workaround :
==========
Please try following workaround untill you get the Hotfix:

1). Increase the DB connections by running DomainUtility --&gtServer Settings - > Database Configuration , change the min and max connections to very high value.
     For e.g min >=25 and max >= 100

2). You will need to restart the TIBCO Administrator.

3). On the TIBCO Administrator Console access application corrupted due to Stream Closed . Goto Application Management --> < BW App Name>--&gtConfiguration --> Revert , select the last working revision and save the configuration, this will help recover applications failing with stream closed.

Issue/Introduction

TIBCO Administrator or AppManage fails with "java.io.IOException: Stream closed" exception while deploying/undeploying an application in the domain.

Environment

OS: All Oracle Database 10.x, 11.x,DB2 9.x,MS SQL 2005,2008,2008-R2