"java.io.IOException: JZ0I6: An error occurred converting UNICODE to the charset used by the server. Error message: java.io.CharConversionException: java.io.UnsupportedEncodingException: hp-roman8" message on a dataSource.getConnection() call to a Sybase
 Technote (FAQ)
 
Problem
Receive
"java.io.IOException: JZ0I6: An error occurred converting UNICODE to the charset used by the server. Error message: java.io.CharConversionException: java.io.UnsupportedEncodingException: hp-roman8"
message on a dataSource.getConnection() call.
 
Solution
To fix this error, a configuration change is needed.

If the error occurs when connecting the administrative repository database, add the following to the admin.config file:


com.ibm.ejs.sm.adminServer.connectionProperties
Use this property to pass arguments into setConnectionProperties() for the WebSphere® administrative server Java™ process.
For example, if using Sybase as the administrative database, you can set CHARSET_CONVERTER_CLASS=com.sybase.jdbc2.utils.TruncationConverter to prevent exceptions such as this one when performing a dataSource.getConnection() call:
java.io.IOException: JZ0I6: An error occurred converting UNICODE to the charset used by the server. Error message: java.io.CharConversionException: java.io.UnsupportedEncodingException: hp-roman8
Set additional connectionProperties by specifying them using the same pattern, separated by commas: PROPERTY_NAME=value;PROPERTY_NAME=value; ...

If the error occurs within an application running on WebSphere, then in the Custom Properties for the datasource add a property with connectionProperties as the Name and CHARSET_CONVERTER_CLASS=com.sybase.jdbc2.utils.TruncationConverter as the Value:


connectionProperties
CHARSET_CONVERTER_CLASS=com.sybase.jdbc2.utils.TruncationConverter
Setting the CHARSET_CONVERTER_CLASS can prevent exceptions such as this one when performing a dataSource.getConnection() call:
java.io.IOException: JZ0I6: An error occurred converting UNICODE to the charset used by the server. Error message: java.io.CharConversionException: java.io.UnsupportedEncodingException: hp-roman8
Set additional connectionProperties by specifying them using the same pattern, separated by commas: PROPERTY_NAME=value;PROPERTY_NAME=value; ...

More information can be found in the WebSphere 4.0 Information Center at
http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/06064600.html
and
http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/0606140001.html

 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > DB Connections/Connection Pooling
Operating system(s): Windows
Software version: 4.0.7
Software edition:
Reference #: 1066787
IBM Group: Software Group
Modified date: Mar 31, 2006