IBM Support

Character Conversion Errors with Job CCSID 65535

Troubleshooting


Problem

Applications that use the IBM Developer Kit for Java JDBC driver must have the job CCSID (coded character set ID) set to a value that is appropriate for the specified language. If the job CCSID is set to 65535, the connection fails.

Resolving The Problem

When using the IBM Developer Kit for Java JDBC driver (also known as the native JDBC driver) (com.ibm.db2.jdbc.app.DB2Driver) the job CCSID (coded character set ID) must be set to a CCSID that is compatible with the table and field CCSIDs being used by the application. A job CCSID of 65535 cannot be used.

CCSID 65535 implies that character data is in an "unknown" CCSID. Characters outside the invariant character set might not be converted correctly. To prevent this problem, the native JDBC driver does not allow connections to be made if the job CCSID is 65535. If a connection is attempted from a job running with CCSID 65535, the following exception occurs:

SQL State: HY000
Native:      -99999
Message:   INTERNAL ERROR:  Creation of DB2Driver object for registering with DriverManager failed.          
Next Exception - 22522(-99999): CCSID value is not valid.
       
java.sql.SQLException: INTERNAL ERROR:  Creation of DB2Driver object for registering with DriverManager failed.
        at java/lang/Throwable.<init>(Throwable.java:195)
        at java/lang/Exception.<init>(Exception.java:41)
        at java/sql/SQLException.<init>(SQLException.java:40)
        at com/ibm/db2/jdbc/app/DB2Driver.<clinit>(DB2Driver.java:253)
        at java/lang/Class.forName(Class.java:164)
        at jdbcq.RunSQL(jdbcq.java:42)
        at jdbcq.main(jdbcq.java:24)


To resolve the problem, update the CCSID for the user profile used on the job that contains the JVM. For JDBC connections made under IBM® WebSphere® Advanced Server applications, the profile used with the default settings is QEJBSVR. Use the CHGUSRPRF command to update a specific user profile or, if the profile is configured for *SYSVAL, consider updating the QCCSID system value. It is also recommended that the user profile used on the JDBC connection is configured with the same CCSID. Refer to the IBM® iSeries™ Information Center topic Language identifiers and associated default CCSIDs for further information on selecting the appropriate CCSID.

NOTE: If there is a mismatch between the PTF levels of the JAR file containing the JDBC driver classes and the service program, the same internal error is logged. See this document for further details.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"Data Access","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Historical Number

29290926

Document Information

Modified date:
26 December 2019

UID

nas8N1016706