Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Driver connection collation error

126 views
Skip to first unread message

jdbcuser

unread,
Sep 2, 2009, 6:31:01 PM9/2/09
to
Hello am trying to use a tool called isql-viewer to connect to an SQL Server
2008 using JDBC driver v2.0.The database am connecting to uses an
"Chinese_PRC_CI_AS" collation.

I get the following exception:

com.microsoft.sqlserver.jdbc.SQLServerException: Windows collation zh_CN is
not supported by this driver.
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.processEnvChange(SQLServerConnection.java:2013)
at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEnvChange(tdsparser.java:168)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:64)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2532)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:1929)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:1917)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1061)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716)
at
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841)
at org.isqlviewer.sql.JdbcService$2$1.run(JdbcService.java:528)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.UnsupportedEncodingException: Windows collation zh_CN is
not supported by this driver.
at
com.microsoft.sqlserver.jdbc.SQLCollation.encodingFromLCID(SQLCollation.java:329)
at com.microsoft.sqlserver.jdbc.SQLCollation.<init>(SQLCollation.java:53)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.processEnvChange(SQLServerConnection.java:2009)
... 14 more
Caused by: java.io.UnsupportedEncodingException: Codepage MS936 is not
supported by the Java environment.
at
com.microsoft.sqlserver.jdbc.Encoding.checkSupported(SQLCollation.java:578)
at
com.microsoft.sqlserver.jdbc.SQLCollation$WindowsLocale.getEncoding(SQLCollation.java:302)
at
com.microsoft.sqlserver.jdbc.SQLCollation.encodingFromLCID(SQLCollation.java:323)
... 16 more

David Olix

unread,
Sep 8, 2009, 5:11:07 PM9/8/09
to
Hi,

Looking at the call stack...

Caused by: java.io.UnsupportedEncodingException: Codepage MS936 is not
supported by the Java environment.
at
com.microsoft.sqlserver.jdbc.Encoding.checkSupported(SQLCollation.java:578)
at
com.microsoft.sqlserver.jdbc.SQLCollation$WindowsLocale.getEncoding(SQLColla
tion.java:302)
at
com.microsoft.sqlserver.jdbc.SQLCollation.encodingFromLCID(SQLCollation.java
:323)

Check your Java VM vendor's instructions for how to support the MS936
charset encoding in the Java environment on your operating system platform.

For example, if you are using Sun's JRE on Windows then you need to install
the "international languages" version (which contains the lib/charsets.jar
file) rather than the default "European languages version". See
http://java.sun.com/javase/6/docs/technotes/guides/intl/encoding.doc.html
for details.

Regards,
--David Olix [SQL Server]

0 new messages