Question & Answer
Question
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.
Answer
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:
http://www-01.ibm.com/support/docview.wss?uid=swg21662460
[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.
ERRORCODE=-4499, SQLSTATE=58009
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
echo $CLASSPATH
/home/db2inst1/sqllib/java/db2java.zip:/home/db2inst1/sqllib/java/db2jcc_license_cisuz.jar:/home/db2inst1/sqllib/java/db2jcc.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
http://www-01.ibm.com/support/docview.wss?uid=swg21589628
4) JDBC Type 2 connection experiences DRDA Data Stream Syntax Error after DB2 upgrade
http://www-01.ibm.com/support/docview.wss?uid=swg21462154
Reason Code 0x2:
Possible cause (0x2):
IC69459
http://www-01.ibm.com/support/docview.wss?uid=swg1IC69459
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):
1. 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 test.ibm.com with port 50,000. Since there is a firewall preventing the Java application from connecting, it returns an error.
telnet test.ibm.com 50000
Trying...
Error: Must authenticate before using this service.
Connection closed.
If there is no firewall blocking the port, it will output
telnet test.ibm.com 50000
Trying...
Connected to test.ibm.com.
Escape character is '^]'.
Knowledge Collection: DB2 JDBC driver for version xxx APARs
http://www-01.ibm.com/support/docview.wss?uid=swg21662460
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.
ERRORCODE=-4499, SQLSTATE=58009
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
echo $CLASSPATH
/home/db2inst1/sqllib/java/db2java.zip:/home/db2inst1/sqllib/java/db2jcc_license_cisuz.jar:/home/db2inst1/sqllib/java/db2jcc.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
http://www-01.ibm.com/support/docview.wss?uid=swg21589628
4) JDBC Type 2 connection experiences DRDA Data Stream Syntax Error after DB2 upgrade
http://www-01.ibm.com/support/docview.wss?uid=swg21462154
Reason Code 0x2:
Possible cause (0x2):
IC69459
http://www-01.ibm.com/support/docview.wss?uid=swg1IC69459
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):
1. 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 test.ibm.com with port 50,000. Since there is a firewall preventing the Java application from connecting, it returns an error.
telnet test.ibm.com 50000
Trying...
Error: Must authenticate before using this service.
Connection closed.
If there is no firewall blocking the port, it will output
telnet test.ibm.com 50000
Trying...
Connected to test.ibm.com.
Escape character is '^]'.
Contact your network administrator to determine how to open a connection through the firewall for your Java application.
2. The error can also be caused if you are attempting a SSL connection and you missed providing "sslConnection=true" setting. Set the keyword sslConnection to true to resolve this error.
Related Information
[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Connectivity - DRDA","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.8;9.7;9.5;9.1;10.1;10.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Was this topic helpful?
Document Information
Modified date:
28 April 2021
UID
swg21691531