Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help db2 JDBC driver error--[jcc][t4][1065][12306][3.53.95] Caught java.io.CharConversionException

 
Joe wood
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
code is like this:


the column has Chinese character and a special character, the hex code is D0CBD2B5D2F8D0D0D6D8C7ECB7D6D0D0BBC6CAAFBEC6B5EA2020202020FA20202020202020202020
the special hex code is FA.

anyone has the solution to fix it??

the code is correct in windows and linux(ubuntu) with sun JDK. but it's error in aix with ibm JDK. the error is

com.ibm.db2.jcc.b.SqlException: [jcc][t4][1065][12306][3.53.95] Caught java.io.CharConversionException. See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null
at com.ibm.db2.jcc.b.bd.a(bd.java:660)
at com.ibm.db2.jcc.b.bd.a(bd.java:60)
at com.ibm.db2.jcc.b.bd.a(bd.java:112)
at com.ibm.db2.jcc.b.gc.a(gc.java:1807)
at com.ibm.db2.jcc.b.gc.a(gc.java:558)
at com.ibm.db2.jcc.b.gc.o(gc.java:536)
at com.ibm.db2.jcc.b.gc.P(gc.java:1718)
at com.ibm.db2.jcc.b.vl.e(vl.java:1275)
at com.ibm.db2.jcc.b.vl.getObject(vl.java:1257)
at weblogic.jdbc.wrapper.ResultSet_com_ibm_db2_jcc_t4_j.getObject(Unknown Source)

java.nio.charset.MalformedInputException: Input length = 697
at com.ibm.db2.jcc.b.v.a(v.java:19)
at com.ibm.db2.jcc.b.gc.a(gc.java:1803)
at com.ibm.db2.jcc.b.gc.a(gc.java:558)
at com.ibm.db2.jcc.b.gc.o(gc.java:536)
at com.ibm.db2.jcc.b.gc.P(gc.java:1718)
at com.ibm.db2.jcc.b.vl.e(vl.java:1275)
at com.ibm.db2.jcc.b.vl.getObject(vl.java:1257)
at weblogic.jdbc.wrapper.ResultSet_com_ibm_db2_jcc_t4_j.getObject(Unknown Source)
at weblogic.jdbc.rowset.CachedRow.retrieveData(CachedRow.java:156)
at weblogic.jdbc.rowset.CachedRow.<init>(CachedRow.java:147)
at weblogic.jdbc.rowset.CachedRowSetImpl.populate(CachedRowSetImpl.java:250)
at weblogic.jdbc.rowset.CachedRowSetImpl.populate(CachedRowSetImpl.java:173)
 
Captain Nuss
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Same here with more recent jcc version. [jcc][t4][1065][12306][3.62.56].
 
Captain Nuss
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My stacktrace is however:

Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][3.62.56] Bedingung java.io.CharConversionException abgefangen. Details finden Sie im angehÃĪngten Element der Throwable-Klasse. ERRORCODE=-4220, SQLSTATE=null
at com.ibm.db2.jcc.am.fd.a(fd.java:660)
at com.ibm.db2.jcc.am.fd.a(fd.java:60)
at com.ibm.db2.jcc.am.fd.a(fd.java:112)
at com.ibm.db2.jcc.am.ic.a(ic.java:2222)
at com.ibm.db2.jcc.am.ic.p(ic.java:519)
at com.ibm.db2.jcc.am.ic.N(ic.java:1524)
at com.ibm.db2.jcc.am.ym.e(ym.java:1147)
at com.ibm.db2.jcc.am.ym.getString(ym.java:1122)
at com.ibm.db2.jcc.am.ym.getString(ym.java:1646)
at com.mchange.v2.c3p0.impl.NewProxyResultSet.getString(NewProxyResultSet.java:3342)
at org.hibernate.type.descriptor.sql.VarcharTypeDescriptor$2.doExtract(VarcharTypeDescriptor.java:61)
at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:249)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:229)
at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:330)
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2283)
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1527)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1455)
at org.hibernate.loader.Loader.getRow(Loader.java:1355)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:611)
at org.hibernate.loader.Loader.doQuery(Loader.java:829)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2533)
... 56 more
Caused by: java.nio.charset.MalformedInputException: Input length = 145
at com.ibm.db2.jcc.am.u.a(u.java:19)
at com.ibm.db2.jcc.am.ic.a(ic.java:2218)
... 76 more
Caused by: sun.io.MalformedInputException
at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:107)
at com.ibm.db2.jcc.am.u.a(u.java:16)
... 77 more
 
Joe wood
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am not back here long time ................
update the db2 driver can fix this problem.
 
Joe wood
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please reference this apar https://www.ibm.com/support/entdocview.wss?uid=swg1IC74895
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic