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();
}
}