java - sybase jdbc connection issue -
i beginner in sybase. trying make simple jdbc connection sybase server. using below code.
i have jcon3.jar in classpath too.
try { class.forname("com.sybase.jdbc3.jdbc.sybdatasource"); system.out.println("before connection"); connection conn = drivermanager.getconnection("jdbc:sybase:tds:localhost:1326/db","butt","clear"); system.out.println("after connection"); } catch (exception e) { e.printstacktrace(); }
i not able achieve expect. below error getting.
inside try before connection java.sql.sqlexception: jz00l: login failed. examine sqlwarnings chained exception reason(s). @ com.sybase.jdbc3.jdbc.errormessage.raiseerror(unknown source) @ com.sybase.jdbc3.tds.tds.for(unknown source) @ com.sybase.jdbc3.tds.tds.a(unknown source) @ com.sybase.jdbc3.tds.tds.login(unknown source) @ com.sybase.jdbc3.jdbc.sybconnection.a(unknown source) @ com.sybase.jdbc3.jdbc.sybconnection.a(unknown source) @ com.sybase.jdbc3.jdbc.sybconnection.<init>(unknown source) @ com.sybase.jdbc3.jdbc.sybconnection.<init>(unknown source) @ com.sybase.jdbc3.jdbc.sybdriver.connect(unknown source) @ java.sql.drivermanager.getconnection(unknown source) @ java.sql.drivermanager.getconnection(unknown source) @ com.risk.jdbc.testjdbc.main(testjdbc.java:19) sql error : state=[jz00l] jz00l: login failed. examine sqlwarnings chained exception reason(s). sql error : state=[jz0ib] jz0ib: server's default charset of roman8 not map encoding available in client java environment. because jconnect not able client-side conversion, connection unusable , being closed. try using later java version, or try including java installation's i18n.jar or charsets.jar file in classpath. sql error : state=[jz006] jz006: caught ioexception: java.io.charconversionexception: java.io.unsupportedencodingexception: hp-roman8
- download sybase's latest version of driver.
- include sybase driver's i18n.jar and/or charsets.jar.
Comments
Post a Comment