Resolve "java.io.UnsupportedEncodingException: hp-roman8" when performing dataSource.getConnection() call with Sybase.
 Technote (FAQ)
 
Problem
When performing dataSource.getConnection() call with the administrative database or the application server database with Sybase, the following exception is seen:
java.io.IOException: JZ0I6: An error occured converting UNICODE to the charset used by the server. Error message: java.io.CharConversionException: java.io.UnsupportedEncodingException: hp-roman8
 
Solution
If you are using Sybase as the administrative database, you can set the following connection properties CHARSET_CONVERTER_CLASS=com.sybase.jdbc2.utils.TruncationConverter in admin.config file to prevent exceptions.
Set additional connectionProperties by specifying them using the same pattern, separated by commas: PROPERTY_NAME=value;PROPERTY_NAME=value

If using Sybase as the application server database, you need to add a custom property to your datasource as follows: key: connectionProperties value: CHARSET_CONVERTER_CLASS=com.sybase.jdbc2.utils.TruncationConverter to prevent the exceptions. If you need more than one connectionProperty, simply give more on the values and separate each by a semicolon. This works this way because the method on the DataSource is setConnectionProperties(java.util.Properties), whereas most other DataSources have something more like setCharsetConverterClass.

 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Administrative Console (all non-scripting)
Operating system(s): HP-UX
Software version: 4.0
Software edition:
Reference #: 1078648
IBM Group: Software Group
Modified date: Oct 30, 2003