Hi All, We have an application running on Solaris 8 which checks an oracle database and a javaservlet sends out the mails at regular intervals based on the status whether the message was sent or not. The application has been running fine until now for abt 10 months. But today morning we noticed that all mailing services had stopped. When we investigated further we found that there was one message which was holding the entire queue and none of the mails posted after that were being sent. On checking the logs we found this error. "Fail to convert between UTF8 and UCS2: failUTF8Conv"
Apparently it talks abt chracter set conversion in the database. The message that was blocking was in some other language other than english, possibly french. And we use Oracle 8 thin drivers to connect to the database and the jdk version is jdk1.2.2. Has somebody faced the same problem and is there any solution to this.. I did check each of the sites Google fished out to me.. but they only talk more about the problem rather than the solution to the problem.
Please help me with this problem.. Here is the content of the log file.. java.sql.SQLException: Fail to convert between UTF8 and UCS2: failUTF8Conv at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.<init>(Compiled Code) at java.lang.Exception.<init>(Compiled Code) at java.sql.SQLException.<init>(SQLException.java:43) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156) at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:775) at oracle.jdbc.dbaccess.DBConversion.failUTF8Conv(DBConversion.java:1746) at oracle.jdbc.dbaccess.DBConversion.utf8BytesToJavaChars(Compiled Code) at oracle.jdbc.dbaccess.DBConversion.utf8BytesToString(Compiled Code) at oracle.jdbc.dbaccess.DBConversion.CharBytesToString(Compiled Code) at oracle.jdbc.driver.OracleStatement.getStringValue(Compiled Code) at oracle.jdbc.driver.OracleStatement.getObjectValue(Compiled Code) at oracle.jdbc.driver.OracleStatement.getObjectValue(Compiled Code) at oracle.jdbc.driver.OracleResultSetImpl.getObject(Compiled Code) at sun.jdbc.rowset.CachedRowSet.populate(Compiled Code) at com.sapient.core.sql.SQLCachedRowSet.populate(Compiled Code) at com.sapient.core.sql.SQLWrapper.executeQueryStoredProc(Compiled Code) at com.sapient.core.sql.SQLWrapper.executeQueryStoredProc(Compiled Code) at com.edward.mailwrapper.MailUtil.getUnsentMailsParameters(Compiled Code) at com.edward.mailwrapper.MailService.performScheduledTask(Compiled Code) at atg.service.scheduler.ScheduledJob.runJobs(Compiled Code) at atg.service.scheduler.Scheduler$2$handler.run(Scheduler.java:694) Message----> Fail to convert between UTF8 and UCS2: failUTF8Conv SQLCode----> 17037 SQLState----> null --java.sql.SQLException: Fail to convert between UTF8 and UCS2: failUTF8Conv
Is there any reason why this question is a cut-and-paste replica of a question posted to a mailing list about 11 months ago? Duplicate Question Maybe you could email that person and ask if they found a solution?
This exception comes when the application tried to retreive Taiwanese (multi byte) data from a Oracle 9i UTF8 database. The excetion stems out of the resultset.getString() method used to fetch data, so it is a driver level problem. Possibly its got something to do with the way the metod is implemented in the old 8i or 9i driver.
To fix the problem there are 2 options : Option 1: Upgrade to oracle 10g driver by getting new classes12.jar from Orcale website. or Option 2: Retreive data as a byte stream. The sample code would look like :