I have a JDBC type 4 driver, connecting to a Japanese SQL Server 2000. The connection gives this SQL exception:
SQLException: Codepage 932 is not supported by the Java environment.
SQL State: null
SQL Code: 0
This same software has been in use and working just fine for over 2 years with other servers. Does anyone know the solution to this problem?
Thanks!
pds2
What JDBC driver are you using?
The exception "Codepage 932 is not supported by the Java environment." doesn't sound like it's coming from SQL Server so the driver is likely raising it based on server configuration.
Try checking the database collation on SQL Server. That may have changed.
If this new SQL Server is running on a different machine is it possible that the Windows OS is running with a different locale?
Hope this helps,
Vaughn
|||Hi,
The Microsoft SQL Server 2005 JDBC Driver relies on nio Charset support in the JVM to map from CHAR/VARCHAR/TEXT values with SQL collations to Java String instances. To do that, it needs to have charsets.jar, provided by your JVM vendor, installed and accessible via your application's classpath. Some JVM vendors choose not install charsets.jar, depending on what languages are supported by the host operating system at the time when the JVM is installed. So you may need to install charsets.jar separately.
For further information, please refer to:
http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html
If you have charsets.jar installed and are still seeing this issue, please reply to this thread and I'll attempt to diagnose the issue further.
Thank you,
--David
|||This fixed the problem! Many thanks!
pds2
|||Hi David,
I have same error message from running agent on Domino server 7 tried to connect to SQL 2005 as:
java.lang.NoClassDefFoundError:java/nio/charset/Charset
at com.microsoft.sqlserver.jdbc.SQLCollation.readCollation
at com.microsoft.sqlserver.jdbc.SQLCollation.<init>
at com.microsoft.sqlserver.jdbc.IOBuffer.processEnvChange
at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets
at com.microsoft.sqlserver.jdbc.SQLServerConnection.processLogon
...
at java.sql.DriverManager.getConnection(DriverManager.java:539)
at java.sql.DriverManager.getConnection(DriverManager.java:211)
...
And I had installed j2sdk1.4.2_13 from Sun, and checked the charsets.jar is in place in c:\j2sdk1.4.2_13\jre\lib,
All the code with old three jar files were running well with SQL 2000 server before, after the harware failure on that server, we are now with SQL 2005 server, all the agents connected to it changed to new JDBC driver and new jar - sqljdbc.jar are not working at all becuase of this problem...
I had sqljdbc.jar in classpath too, here we are in US (enu). I don't know what else I 've under looked?
Thanks for your help.
Evelyn
|||Instead of using MS JDBC driver1.1, downloaded jTDS jdbc driver solved the problem!
No comments:
Post a Comment