I try to open a file with 1 chinese character in UTF format and i read it tried to store into the oracle database. FileInputStream fis = new FileInputStream(strFileName); // i have define the strfilename BufferedReader breader = new BufferedReader(new InputStreamReader(fis, "UTF-8")); I got this error: com.sssw.rt.util.AgoSystemDatabaseException: ORA-01401: inserted value too large for column 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 com.sssw.rt.util.AgoException.<init>(Compiled Code) at com.sssw.rt.util.AgoException.<init>(Compiled Code) at com.sssw.rt.util.AgoApiException.<init>(Compiled Code) at com.sssw.rt.util.AgoSystemException.<init>(Compiled Code) at com.sssw.rt.util.AgoUnrecoverableSystemException.<init>(Compiled Code ) at com.sssw.rt.util.AgoSystemDatabaseException.<init>(Compiled Code) at com.sssw.srv.ambry.AmbryModifyStatement.prepareAndExecuteUpdate(Compi led Code) anyone can help where goes wrong?
The code you show deals with reading the value from a file, but the exception seems to come from trying to insert it into the database. I'm guessing the problem is the column in the database is defined to contain a single character, but only understands single byte (ASCII) characters. Is it possible to configure your database to support Unicode? Otherwise, you will probably have to break the Unicode into two bytes and store it that way, or convert it back to UTF and store it as between one and three bytes.
Joined: Apr 18, 2002
thansk greg, appreciated that.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com