I am trying to create a thread for only one method. Im getting an IllegalStateException (see below). In this method, it accepts a connection to the database and the database name, and it will generate XML from it. (This part works, I'm just trying to make it faster with a new stream, because I have several XML files to create.
Thread table = new Thread(new Runnable() { public void run() { try { System.out.println("starting"); tableXml(tableConn, dbName); System.out.println("ending"); } catch (Exception e) {
An exception:
java.lang.IllegalStateException: Current state = RESET, new state = FLUSHED at java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.java:951) at java.nio.charset.CharsetEncoder.flush(CharsetEncoder.java:640) at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:769) at com.informix.lang.JavaToIfxType.doConversion(JavaToIfxType.java:841) at com.informix.lang.JavaToIfxType.JavaToIfxChar(JavaToIfxType.java:145) at com.informix.jdbc.IfxVarChar.toString(IfxVarChar.java:247) at com.informix.jdbc.IfxResultSet.getString(IfxResultSet.java:742) at com.informix.jdbc.IfxResultSet.getString(IfxResultSet.java:785) at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:225) at com.test.ex.ExportTask$1.run(ExportTask.java:151) at java.lang.Thread.run(Thread.java:662)
The line of code that resultSet.executeQuery(); exception is resultSet.executeQuery();
So the question is: what am I doing wrong?
Thanks for your help, let me know if you need information.
source share