JDBC 3.5
Posted in 2009
Topics: Connectivity: ODBC / JDBC / .NET, Java & JDBC Development
Hi All, Informix-Server: IBM Informix Dynamic Server Version 10.00.FC8 since upgrading from Informix JDBC-Version 2.21 to 3.5, we somtimes get the following curious error, when fetching data from an IDS 10 FC8 (Linux). 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.IfxChar.toString(IfxChar.java:264) at com.informix.jdbc.IfxResultSet.getString(IfxResultSet.java:742) On the client-side, we are using JDBC-Driver: IBM Informix JDBC Driver for IBM Informix Dynamic Server 3. 50 OS: Linux RH 2.6.18-128.1.1.el5 #1 SMP Mon Jan 26 13:58:24 EST 2009 x86_64 x86_64 x86_64 GNU/Linux JDK: java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode) Any ideas, how to avoid that bevaviour? Thanks a ot for any answer! Regards Markus
Markus Bschorer wrote: > Hi All, > > Informix-Server: IBM Informix Dynamic Server Version 10.00.FC8 > > since upgrading from Informix JDBC-Version 2.21 to 3.5, we somtimes get the > following curious error, when fetching data from an IDS 10 FC8 (Linux). > > 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.IfxChar.toString(IfxChar.java:264) > at com.informix.jdbc.IfxResultSet.getString(IfxResultSet.java:742) > > On the client-side, we are using > > JDBC-Driver: > IBM Informix JDBC Driver for IBM Informix Dynamic Server 3. 50 > > OS: > Linux RH 2.6.18-128.1.1.el5 #1 SMP Mon Jan 26 13:58:24 EST 2009 x86_64 > x86_64 x86_64 GNU/Linux > > JDK: > java version "1.6.0_17" > Java(TM) SE Runtime Environment (build 1.6.0_17-b04) > Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode) > > > Any ideas, how to avoid that bevaviour? > > Thanks a ot for any answer! > > Regards > Markus > > You're probably pulling characters out of your database which are not known in the target characterset. Before JDBC 3.5 unknown characters where replaced by a question mark when reading from or writing to the database. Now this triggers an exception. You have to define the right codesets on connect. That's the experience we made some time ago when switching to JDBC 3.50.x.
Frank Langelage wrote: > Markus Bschorer wrote: >> Hi All, >> >> Informix-Server: IBM Informix Dynamic Server Version 10.00.FC8 >> >> since upgrading from Informix JDBC-Version 2.21 to 3.5, we somtimes >> get the following curious error, when fetching data from an IDS 10 FC8 >> (Linux). >> >> 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.IfxChar.toString(IfxChar.java:264) >> at >> com.informix.jdbc.IfxResultSet.getString(IfxResultSet.java:742) >> >> On the client-side, we are using >> >> JDBC-Driver: >> IBM Informix JDBC Driver for IBM Informix Dynamic Server 3. 50 >> >> OS: >> Linux RH 2.6.18-128.1.1.el5 #1 SMP Mon Jan 26 13:58:24 EST 2009 >> x86_64 x86_64 x86_64 GNU/Linux >> >> JDK: >> java version "1.6.0_17" >> Java(TM) SE Runtime Environment (build 1.6.0_17-b04) >> Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode) >> >> >> Any ideas, how to avoid that bevaviour? >> >> Thanks a ot for any answer! >> >> Regards >> Markus >> > > You're probably pulling characters out of your database which are not > known in the target characterset. > Before JDBC 3.5 unknown characters where replaced by a question mark > when reading from or writing to the database. > Now this triggers an exception. > You have to define the right codesets on connect. > That's the experience we made some time ago when switching to JDBC 3.50.x. http://www-01.ibm.com/support/docview.wss?uid=swg1IC49877
Hi Frank, thanks a lot for your answer. We found out, that 28 of our 30 linux / solaris server are working without any problem. Just 2 RH9-Server, when using jdk1.6 produce that error. Using jdk1.5, they are working like all others without any problem. Maybe we have to reinstall them... Regards Markus "Frank Langelage" <frank@lafr.de> schrieb im Newsbeitrag news:7o85jdF3of1reU1@mid.individual.net... > Frank Langelage wrote: >> Markus Bschorer wrote: >>> Hi All, >>> >>> Informix-Server: IBM Informix Dynamic Server Version 10.00.FC8 >>> >>> since upgrading from Informix JDBC-Version 2.21 to 3.5, we somtimes get >>> the following curious error, when fetching data from an IDS 10 FC8 >>> (Linux). >>> >>> 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.IfxChar.toString(IfxChar.java:264) >>> at >>> com.informix.jdbc.IfxResultSet.getString(IfxResultSet.java:742) >>> >>> On the client-side, we are using >>> >>> JDBC-Driver: >>> IBM Informix JDBC Driver for IBM Informix Dynamic Server 3. 50 >>> >>> OS: >>> Linux RH 2.6.18-128.1.1.el5 #1 SMP Mon Jan 26 13:58:24 EST 2009 x86_64 >>> x86_64 x86_64 GNU/Linux >>> >>> JDK: >>> java version "1.6.0_17" >>> Java(TM) SE Runtime Environment (build 1.6.0_17-b04) >>> Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode) >>> >>> >>> Any ideas, how to avoid that bevaviour? >>> >>> Thanks a ot for any answer! >>> >>> Regards >>> Markus >>> >> >> You're probably pulling characters out of your database which are not >> known in the target characterset. >> Before JDBC 3.5 unknown characters where replaced by a question mark when >> reading from or writing to the database. >> Now this triggers an exception. >> You have to define the right codesets on connect. >> That's the experience we made some time ago when switching to JDBC >> 3.50.x. > > http://www-01.ibm.com/support/docview.wss?uid=swg1IC49877