Skip to main content
Delphix

Errors JZ0C0 or JZ0BE Raised while Masking ASE Databases (KBA6094)

 

KBA

KBA# 6094

 

Issue

When masking an ASE database, the following errors may be raised and found in the Delphix Masking Engine's debug logs:

JZ006: Caught IOException: com.sybase.jdbc4.jdbc.SybConnectionDeadException: JZ0C0: Connection is already closed
JZ0BE: BatchUpdateException: Error occurred while executing batch statement: The parameter of type 36 did not have a valid value.
Note

Note:

The parameter type (36 in the above example) may be different based on the column types of the table being masked.

There are three bugs in the SAP jConnect JDBC driver that either:

  • Cause the JZ0C0 error to be raised in place of the actual underlying error.
  • Or raise the "The parameter of type 36 did not have a valid value" error.
ASE bug number Description SAP KB Article
821529 The error message, "JZ0C0: Connection is already closed", may be reported by jConnect driver instead of the root cause of why the connection is getting closed. 2917402 - jConnect driver is not displaying correct error message. Displays JZ0C0: Connection is already closed instead
820924 Batch insert fails with parameter using stmt.setCharacterStream. Parameter of type 36 did not have a valid value or Connection is already closed 2885306 - jConnect: The parameter of type 36 did not have a valid value or Connection is already closed
821405 Attempt to insert duplicate key row in object is displayed as Connection is already closed. 2911976 - jConnect: JZ0BE Attempt to insert duplicate key row is displayed as JZ0C0 Connection is already closed

Prerequisites

Delphix uses the SAP jConnect JDBC driver to connect to ASE and perform masking related queries (SELECT/INSERT/UPDATE). JZ006, JZ0C0 and JZ0BE are all error codes raised by the JDBC driver itself. JZ0C0 is very common and is often raised when an application using the JDBC driver abruptly loses its connection to the database. Examples of legitimate JZ0C0 errors include:

  • The ASE instance crashed.
  • ASE was shutdown with the "nowait" clause.
  • The spid running the SQL statement was terminated (due to a deadlock or by being "infected").

This article addresses some other situations where JZ0C0 or "The parameter of type 36 did not have a valid value" errors can be raised when there is no legitimate disruption to connectivity.

Applicable Delphix Versions

Click here to view the versions of the Delphix engine to which this article applies
Major Release All Sub Releases
6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0

5.3

5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0

5.2

5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1

5.1

5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0

5.0

5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1 ,5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4

4.3

4.3.1.0, 4.3.2.0, 4.3.2.1, 4.3.3.0, 4.3.4.0, 4.3.4.1, 4.3.5.0

4.2

4.2.0.0, 4.2.0.3, 4.2.1.0, 4.2.1.1, 4.2.2.0, 4.2.2.1, 4.2.3.0, 4.2.4.0 , 4.2.5.0, 4.2.5.1

4.1

4.1.0.0, 4.1.2.0, 4.1.3.0, 4.1.3.1, 4.1.3.2, 4.1.4.0, 4.1.5.0, 4.1.6.0

Resolution

The three bugs are fixed in the following SAP JDBC driver (or newer):

jConnect (TM) for JDBC(TM)/16.0 SP03 PL08 ONEOFF (Build 27481)/P/EBF29475/JDK 1.6.0/jdbcdev/OPT/Mon Jun  1 03:59:16 PDT 2020

To resolve the issue, it will be necessary to upgrade the Masking Engine to version 6.0.3 or higher which includes the newer SAP jConnect JDBC driver.

There are two other uncommonly used areas of the product that might need to be updated after upgrading:

  • After upgrading the Masking Engine if you are using the Generic Database Connector with the SAP ASE jConnect JDBC driver, it will be necessary to change the Custom Driver Name element from com.sybase.jdbc4.jdbc.SybDriver to com.sybase.jdbc42.jdbc.SybDriver.
  • Any ASE mapplets which directly utilize the JDBC driver should be updated to refer to com.sybase.jdbc42.jdbc.SybDriver

Troubleshooting

In the debug logs of the Delphix Masking Engine (which are normally found in a Delphix Support bundle under the masking/logs/Applogs directory, you will see stack traces with the error message similar to the following.

JZ0C0 example:

2019/12/31 16:00:25 - Table input.0 - An error occurred executing SQL:
2019/12/31 16:00:25 - Table input.0 - SELECT "Account_Id" , "Acct_Name" , "Covered" , "Create_By" , "Create_Ts" , "Expiration_Date" , "Long_Calls" , "Long_Puts" , "Processing_Date" , "Sec_No" , "Short_Calls" , "Short_Puts" , "Strike_Price" , "Symbol" , "Total_Long" , "Total_Short" , "Update_By" , "Update_Ts" FROM dbo."Stocks"
2019/12/31 16:00:25 - Table input.0 -
2019/12/31 16:00:25 - Table input.0 - Error determining value metadata from SQL resultset metadata
2019/12/31 16:00:25 - Table input.0 - JZ006: Caught IOException: com.sybase.jdbc4.jdbc.SybConnectionDeadException: JZ0C0: Connection is already closed.
2019/12/31 16:00:25 - Table input.0 -
2019/12/31 16:00:25 - Table input.0 -
2019/12/31 16:00:25 - Table input.0 -   at org.pentaho.di.core.database.Database.openQuery(Database.java:1770)
2019/12/31 16:00:25 - Table input.0 -   at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:236)
2019/12/31 16:00:25 - Table input.0 -   at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:140)
2019/12/31 16:00:25 - Table input.0 -   at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2019/12/31 16:00:25 - Table input.0 -   at java.lang.Thread.run(Thread.java:748)
2019/12/31 16:00:25 - Table input.0 - Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
2019/12/31 16:00:25 - Table input.0 - Error determining value metadata from SQL resultset metadata
2019/12/31 16:00:25 - Table input.0 - JZ006: Caught IOException: com.sybase.jdbc4.jdbc.SybConnectionDeadException: JZ0C0: Connection is already closed.

"The parameter of type 36 did not have a valid value" example:

2019-11-10 19:35:38,062 [pool-5-thread-4] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_436_1646] 2019/11/10 19:35:38 - TableOutput.0 - Error batch inserting rows into table ["Concerts"].
2019-11-10 19:35:38,062 [pool-5-thread-4] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_436_1646] 2019/11/10 19:35:38 - TableOutput.0 - Errors encountered (first 10):
2019-11-10 19:35:38,062 [pool-5-thread-4] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_436_1646] 2019/11/10 19:35:38 - TableOutput.0 - The parameter of type 38 did not have a valid value.
2019-11-10 19:35:38,062 [pool-5-thread-4] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_436_1646] 2019/11/10 19:35:38 - TableOutput.0 -
2019-11-10 19:35:38,062 [pool-5-thread-4] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_436_1646] 2019/11/10 19:35:38 - TableOutput.0 -
2019-11-10 19:35:38,062 [pool-5-thread-4] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_436_1646] 2019/11/10 19:35:38 - TableOutput.0 -
2019-11-10 19:35:38,062 [pool-5-thread-4] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_436_1646] 2019/11/10 19:35:38 - TableOutput.0 -
2019-11-10 19:35:38,062 [pool-5-thread-4] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_436_1646] 2019/11/10 19:35:38 - TableOutput.0 - Error updating batch
2019-11-10 19:35:38,062 [pool-5-thread-4] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_436_1646] 2019/11/10 19:35:38 - TableOutput.0 - JZ0BE: BatchUpdateException: Error occurred while executing batch statement: The parameter of type 38 did not have a valid value.
2019-11-10 19:35:38,062 [pool-5-thread-4] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_436_1646] 2019/11/10 19:35:38 - TableOutput.0 -
2019-11-10 19:35:38,062 [pool-5-thread-4] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_436_1646] 2019/11/10 19:35:38 - TableOutput.0 -
2019-11-10 19:35:38,062 [pool-5-thread-4] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_436_1646] 2019/11/10 19:35:38 - TableOutput.0 - Next Exception: SQLState( ZZZZZ) ErrorCode(3814)