IBM Support

FAQ: JDBC Driver Data Stream Syntax Error

Technote (FAQ)


This FAQ provides a list of causes and solutions for various DRDA syntax error reason codes returned from the JDBC driver. Additional reason codes will be added in the future.


This technote does not provide a comprehensive list of reason codes caused by defects (APARs). A list of defects for the JDBC driver can be found here:

Knowledge Collection: DB2 JDBC driver for version xxx APARs

Reason Code 0x1:

When connecting to the database, the JDBC driver returns the error below:

[jcc][2034][11148][3.53.95] Execution failed due to a distribution protocol error that caused deallocation of the conversation.
A DRDA Data Stream Syntax Error was detected. Reason: 0x1.

Possible causes (0x1):

1) Upgrade JDBC driver (db2jcc.jar or db2jcc4.jar) to newer version or one which matches the one used on DB2 Server. Normally the JDBC driver is backwards and forwards compatible with various releases and fixpacks of DB2 servers so this should not be an issue. Please refer to link at end of technote for JDBC Driver Versions and downloads.

2) Multiple copies of db2jcc.jar/db2jcc4.jar referenced in CLASSPATH environment variable.
To check:
Windows: echo %CLASSPATH%
Unix: echo $CLASSPATH

For example you should only see one version of db2jcc.jar or db2jcc4.jar


3) Running a large query which exceeds SQL limits. For example SELECt * FROM ... WHERE ID IN (...,...,...) in which the maximum number of IN parameters has been exceeded.

Java application executing long query catches DisconnectRecoverableException, returning ERRORCODE -4499

4) JDBC Type 2 connection experiences DRDA Data Stream Syntax Error after DB2 upgrade

Reason Code 0x2:

Possible cause (0x2):

Reason Code 0x3:

When trying to connect to a DB2 database server from an application using the JDBC driver it returns the message below. The message would be returned regardless of whether the correct userid/password was used since it is occurring before authentication.

[jcc][t4][2034][11148][3.64.133] Execution failed due to a distribution protocol error that caused deallocation of the conversation.
A DRDA Data Stream Syntax Error was detected. Reason: 0x3. ERRORCODE=-4499, SQLSTATE=58009

Possible cause (0x3):

The JDBC driver's DRDA error may be caused by a firewall preventing the application from connecting. To verify, try connecting to the same DB2 port using the hostname and DB2 port number.

In the example below, DB2 database server is on with port 50,000. Since there is a firewall preventing the Java application from connecting, it returns an error.

telnet 50000
Error: Must authenticate before using this service.
Connection closed.

If there is no firewall blocking the port, it will output

telnet 50000
Connected to
Escape character is '^]'.

Contact your network administrator to determine how to open a connection through the firewall for your Java application.

Related information

JDBC Driver Versions and Downloads

Document information

More support for: DB2 for Linux, UNIX and Windows
Connectivity - DRDA

Software version: 9.1, 9.5, 9.7, 9.8, 10.1, 10.5

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Reference #: 1691531

Modified date: 04 December 2014