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

JZ0IB error when talking to a GB18030 Sybase adaptive server

18 views
Skip to first unread message

William

unread,
May 29, 2006, 5:55:43 AM5/29/06
to
All,
I get below error message when contacting a GB18030 sybase adaptive
server. And the code is listed as below also. The document shows
GB18030 is supported since jConnect for JDBC 6.x. Why do I still get
such an error? I tried to include charsets.jar to classpath. but
doesn't work neither.

Any response is appreciated.

Thanks!
-William

---------------------------------------------------------------------------------------------------------------------
JZ0IB: The server's default charset of gb18030 does not map to an
encoding that is available in the client Java environment. Because
jConnect will not be able to do client-side conversion, the connection
is unusable and is being closed. Try using a later Java version, or try
including your Java installation's i18n.jar or charsets.jar file in the
classpath.
java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings
chained to this exception for the reason(s).
at
com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(ErrorMessage.java:565)
at com.sybase.jdbc3.tds.Tds.processLoginAckToken(Tds.java:3765)
at com.sybase.jdbc3.tds.Tds.doLogin(Tds.java:576)
at com.sybase.jdbc3.tds.Tds.login(Tds.java:459)
at
com.sybase.jdbc3.jdbc.SybConnection.tryLogin(SybConnection.java:247)
at
com.sybase.jdbc3.jdbc.SybConnection.regularConnect(SybConnection.java:223)
at com.sybase.jdbc3.jdbc.SybConnection.<init>(SybConnection.java:198)
at com.sybase.jdbc3.jdbc.SybConnection.<init>(SybConnection.java:132)
at com.sybase.jdbc3.jdbc.SybDriver.connect(SybDriver.java:179)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at TestSybase.main(TestSybase.java:34)

---------------------------------------------------------------------------------------------------------------------------
public static void main(String[] args) {


try {
Properties _props = new Properties();
_props.put("user", "wcai");
_props.put("password", "password");

SybDriver sybDriver = (SybDriver)
Class.forName ("com.sybase.jdbc3.jdbc.SybDriver").newInstance();

DriverManager.registerDriver( sybDriver);

//_props.put("CHARSET_CONVERTER_CLASS",
"com.sybase.jdbc3.utils.TruncationConverter");

Connection _conn =
DriverManager.getConnection("jdbc:sybase:Tds:wcai04:5000", _props);
System.out.println("Successfully connected!");
_conn.close();

} catch (SQLException ex) {
System.out.println(ex.getSQLState());
System.out.println (ex.getNextException().getMessage());
ex.printStackTrace();

} catch (Exception ex) {
ex.printStackTrace();
}
}

0 new messages