Showing posts with label jdbc. Show all posts
Showing posts with label jdbc. Show all posts

Sunday, March 25, 2012

collation issue

Hi,

I try to use MSDE2000a with JDBC dirver. However I got error message saying
VM encoding error (Cp 1250).

I think i have to change a Collation during setup to Polish.

I did this way, but installation fails then.

I really dont know why.

SebastianThe Torn (thetorn@.op.pl) writes:
> I try to use MSDE2000a with JDBC dirver. However I got error message
> saying VM encoding error (Cp 1250).
> I think i have to change a Collation during setup to Polish.
> I did this way, but installation fails then.
> I really dont know why.

If the problem is related to Microsoft's JDBC driver, you have more
success in microsoft.public.sqlserver.jdbcdriver.

In any case you need to supply more information about what you're
doing. "Installation fails" - do you get an error message or what happens?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Hello,

I have installed MSDE2000a, then I have installed
MS JDBC drivers.

Now I am trying to Use SQLCrator Application, which contects thru JDBC. But
I got following error:

Unsupported VM Encoding Cp1250. I thought i should install MS SQL Sever with
Collaton parateter set to Polish.

I did so, but in this case I got error during installation: saying that
Windows cant setup Server.

Thanks with advance.

regards
Sebastian|||The Torn (thetorn@.op.pl) writes:
> I have installed MSDE2000a, then I have installed
> MS JDBC drivers.
> Now I am trying to Use SQLCrator Application, which contects thru JDBC.
> But I got following error:
> Unsupported VM Encoding Cp1250.

That sounds like a Java error, which I cannot help with.

> I thought i should install MS SQL Sever with Collaton parateter set to
> Polish.

So what default collation did you have initially?

> I did so, but in this case I got error during installation: saying that
> Windows cant setup Server.

Did you uninstall and resintalled? Or did you install a new named instance?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Sunday, March 11, 2012

Codepage 932 is not supported by the Java environment.

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!