270002WDPN

                                           3 Posts                            

Pinned topic                                                              Caught java.io.CharConversionException. ERRORCODE=-4220, SQLSTATE=null

Nov 5, 2010                                     |                     Tags:

Error:

 

none Add Tags Cancel                                            

                         Answered question                        This question has been answered.                    
                         Unanswered question                        This question has not been answered yet.                    
                                                                                                                           Hello Everyone,
     We are having problem w/ retrieving data column that has special character from the db2 database. when we try to use the recordset.getString(columname) method we catch the exception below. Is there any workaround how to retrieve the data w/ out exception?
     Error catch:
     R com.ibm.db2.jcc.b.SqlException: jcct4106512306http://3.50.152 Caught java.io.CharConversionException. See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null
     I tried also using getBytes method and catch different error which is :      Invalid data conversion: Wrong result column type for requested conversion. ERRORCODE=-4461, SQLSTATE=42815
     anyone has the idea how to solve this problem?                              
Updated on Mar 15, 2012 at 10:21 PM by SUGS_Brian_Trapp
  •                                         
    sasami0600017GMX                             
                                               11 Posts                            

    Re: Caught java.io.CharConversionException. ERRORCODE=-4220, SQLSTATE=null

    Nov 6, 2010                                                                                 
                             This is the accepted answer.                         This is the accepted answer.                     
                                                                                                                               Hmmm. May need goet more information from you to see what is going on here.      Will it be too much trouble for asking the following:      1. trace      An example to turn on trace:      ...      private static String url = "jdbc:db2://xxxxxxxxxxxx.vmec.svl.ibm.com:446/STLEC1"      +":traceFile=c:/temp/jdbc4.log"      +";traceLevel="      + com.ibm.db2.jcc.DB2BaseDataSource.TRACE_ALL      + ";";      private static String user="xxxxxxxx";      private static String password="yyyyyyyy";
         ...
         private Connection getConnection() {      String driverClassName = "com.ibm.db2.jcc.DB2Driver";      try {      Class.forName( driverClassName ).newInstance();      } catch (InstantiationException e) {
         e.printStackTrace();      } catch (IllegalAccessException e) {
         e.printStackTrace();      } catch (ClassNotFoundException e) {
         e.printStackTrace();      }      try {      return DriverManager.getConnection ( url,      user,      password);
         } catch (SQLException e) {
         e.printStackTrace();      }      return null;      }
         2. what is the data type for the column ?      3. your code which could reproduce the problem                              
     
  •                                         
    allen.montejo270002WDPN                             
                                               3 Posts                            

    Re: Caught java.io.CharConversionException. ERRORCODE=-4220, SQLSTATE=null

    Nov 8, 2010                                                                                 
                             This is the accepted answer.                         This is the accepted answer.                     
    • sasami             0600017GMX
    • Nov 6, 2010
                                                                    Hmmm. May need goet more information from you to see what is going on here.      Will it be too much trouble for asking the following:      1. trace      An example to turn on trace:      ...      private static String url = "jdbc:db2://xxxxxxxxxxxx.vmec.svl.ibm.com:446/STLEC1"      +":traceFile=c:/temp/jdbc4.log"      +";traceLevel="      + com.ibm.db2.jcc.DB2BaseDataSource.TRACE_ALL      + ";";      private static String user="xxxxxxxx";      private static String password="yyyyyyyy";
         ...
         private Connection getConnection() {      String driverClassName = "com.ibm.db2.jcc.DB2Driver";      try {      Class.forName( driverClassName ).newInstance();      } catch (InstantiationException e) {
         e.printStackTrace();      } catch (IllegalAccessException e) {
         e.printStackTrace();      } catch (ClassNotFoundException e) {
         e.printStackTrace();      }      try {      return DriverManager.getConnection ( url,      user,      password);
         } catch (SQLException e) {
         e.printStackTrace();      }      return null;      }
         2. what is the data type for the column ?      3. your code which could reproduce the problem                                      
    More...                   

    Hi Sasami,
         1. below is the log trace I catch.
    11/8/10 17:40:31:765 SGT 0000001d SystemErr R com.ibm.db2.jcc.b.SqlException: jcct4106512306http://3.50.152 Caught java.io.CharConversionException. See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.wc.a(wc.java:55) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.wc.a(wc.java:111) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.bc.a(bc.java:1766) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.bc.n(bc.java:496) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.bc.F(bc.java:1263) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.jk.d(jk.java:939) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.jk.getString(jk.java:917) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.jk.getString(jk.java:1369) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getString(WSJdbcResultSet.java:1848) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R Caused by: java.nio.charset.MalformedInputException: Input length = 127      at com.ibm.db2.jcc.b.u.a(u.java:19)      at com.ibm.db2.jcc.b.bc.a(bc.java:1762)      at com.ibm.db2.jcc.b.bc.n(bc.java:496)      at com.ibm.db2.jcc.b.bc.F(bc.java:1263)      at com.ibm.db2.jcc.b.jk.d(jk.java:939)      at com.ibm.db2.jcc.b.jk.getString(jk.java:917)      at com.ibm.db2.jcc.b.jk.getString(jk.java:1369)      at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getString(WSJdbcResultSet.java:1848)      at tools.knowledgegate.db.access.InventorDataAccess.findBySerialNumberAndCountryCode(InventorDataAccess.java)      at tools.knowledgegate.http.model.PIHSearchReportHttpActionListener.actionPerformed(PIHSearchReportHttpActionListener.java:66)      at tools.knowledgegate.http.servlet.BrokerServlet.performTask(BrokerServlet.java:216)      at tools.knowledgegate.http.servlet.BrokerServlet.doPost(BrokerServlet.java:83)      at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)      at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)      at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)      at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)      at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)      Caused by: sun.io.MalformedInputException      at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:278)      at com.ibm.db2.jcc.b.u.a(u.java:16)      ... 34 more
         2. The data type of the column is Varchar , size = 256 , nullable = Yes
         3. I can reproduce the problem using below code      System.out.println(recordset.getString("columname"));
         Have you experience such case? I tried to use the getBytes method too and it seems like it doesn't work.
         think and do something different, something has never been done and seen before..                              

     
  •                                         
    sasami0600017GMX                             
                                               11 Posts                            

    Re: Caught java.io.CharConversionException. ERRORCODE=-4220, SQLSTATE=null

    Nov 9, 2010                                                                                 
                             This is the accepted answer.                         This is the accepted answer.                     
                                                                    Hi Sasami,
         1. below is the log trace I catch.
    11/8/10 17:40:31:765 SGT 0000001d SystemErr R com.ibm.db2.jcc.b.SqlException: jcct4106512306http://3.50.152 Caught java.io.CharConversionException. See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.wc.a(wc.java:55) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.wc.a(wc.java:111) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.bc.a(bc.java:1766) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.bc.n(bc.java:496) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.bc.F(bc.java:1263) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.jk.d(jk.java:939) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.jk.getString(jk.java:917) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.db2.jcc.b.jk.getString(jk.java:1369) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getString(WSJdbcResultSet.java:1848) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) 11/8/10 17:40:31:765 SGT 0000001d SystemErr R at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510) 11/8/10 17:40:31:781 SGT 0000001d SystemErr R Caused by: java.nio.charset.MalformedInputException: Input length = 127      at com.ibm.db2.jcc.b.u.a(u.java:19)      at com.ibm.db2.jcc.b.bc.a(bc.java:1762)      at com.ibm.db2.jcc.b.bc.n(bc.java:496)      at com.ibm.db2.jcc.b.bc.F(bc.java:1263)      at com.ibm.db2.jcc.b.jk.d(jk.java:939)      at com.ibm.db2.jcc.b.jk.getString(jk.java:917)      at com.ibm.db2.jcc.b.jk.getString(jk.java:1369)      at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getString(WSJdbcResultSet.java:1848)      at tools.knowledgegate.db.access.InventorDataAccess.findBySerialNumberAndCountryCode(InventorDataAccess.java)      at tools.knowledgegate.http.model.PIHSearchReportHttpActionListener.actionPerformed(PIHSearchReportHttpActionListener.java:66)      at tools.knowledgegate.http.servlet.BrokerServlet.performTask(BrokerServlet.java:216)      at tools.knowledgegate.http.servlet.BrokerServlet.doPost(BrokerServlet.java:83)      at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)      at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)      at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)      at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)      at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)      Caused by: sun.io.MalformedInputException      at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:278)      at com.ibm.db2.jcc.b.u.a(u.java:16)      ... 34 more
         2. The data type of the column is Varchar , size = 256 , nullable = Yes
         3. I can reproduce the problem using below code      System.out.println(recordset.getString("columname"));
         Have you experience such case? I tried to use the getBytes method too and it seems like it doesn't work.
         think and do something different, something has never been done and seen before..                                      
    More...                   

    Hi Allen,
         No. Unforturnatly I am not having any luck to recrete the problem.
         You know you are using a very very old JDBC driver: 3.50.152. Do you have to use a such old driver? The current driver is at 3.62.
         Anyway, I was thinking you may be able to get a trace like following so I can get more information about the problem:      each line should starts with jcc, for example
    jccTime:2010-11-08-21:13:38.031Thread:mainResultSet@7fc07fc getString (2) called jccTime:2010-11-08-21:13:38.046Thread:mainResultSet@7fc07fc getString () returned 2010-11-08 21:13:37 PRÿCESS-1 2010-11-08 21:13:37.453
         So, you see the special character: ÿ      is okay.      Best regards,
         Sasami                              

     
  •                                         
    allen.montejo270002WDPN                             
                                               3 Posts                            

    Re: Caught java.io.CharConversionException. ERRORCODE=-4220, SQLSTATE=null

    Jan 8, 2011                                                                                 
                             This is the accepted answer.                         This is the accepted answer.                     
    • sasami             0600017GMX
    • Nov 9, 2010
                                                                    Hi Allen,
         No. Unforturnatly I am not having any luck to recrete the problem.
         You know you are using a very very old JDBC driver: 3.50.152. Do you have to use a such old driver? The current driver is at 3.62.
         Anyway, I was thinking you may be able to get a trace like following so I can get more information about the problem:      each line should starts with jcc, for example
    jccTime:2010-11-08-21:13:38.031Thread:mainResultSet@7fc07fc getString (2) called jccTime:2010-11-08-21:13:38.046Thread:mainResultSet@7fc07fc getString () returned 2010-11-08 21:13:37 PRÿCESS-1 2010-11-08 21:13:37.453
         So, you see the special character: ÿ      is okay.      Best regards,
         Sasami                                      
    More...                   

    can you guide me where I could download the latest db2 jdbc driver? I will try to upgrade my local copy and I will try if that will fix the problem.

     
  •                                         
    sasami0600017GMX                             
                                               11 Posts                            

    Re: Caught java.io.CharConversionException. ERRORCODE=-4220, SQLSTATE=null

    Jan 8, 2011                                                                                 
                             This is the accepted answer.                         This is the accepted answer.                     
                                                                    can you guide me where I could download the latest db2 jdbc driver? I will try to upgrade my local copy and I will try if that will fix the problem.                                      
    More...                   

    db2 jdbc driver comes w/ db2. If you are not using a very old db2, it is possible that the classpath points to a very old copy of db2jcc.jar. The trace tells DB2 release/version, classpath, etc.
         If you are just running a simple stand-alone java application which uses jdbc APIs, you may posting your code here.
         If you are running some kind of tool which invokes db2, you may still turn jcc trace on dynamically using JVM argument:
         -Ddb2.jcc.propertiesFile=jcc.properties      following is an example of jcc.properties file:
         db2.jcc.override.traceDirectory=/temp/jcctrace      db2.jcc.override.traceFile=trace      db2.jcc.override.traceFileAppend=false      db2.jcc.override.traceLevel=-1      Regards,
         -                              

     
  •                                         
    SUGS_Brian_Trapp060001SUGS                             
                                               2 Posts                            

    Re: Caught java.io.CharConversionException. ERRORCODE=-4220, SQLSTATE=null

    Mar 15, 2012                                                                                 
                             This is the accepted answer.                         This is the accepted answer.                     
    • sasami             0600017GMX
    • Jan 8, 2011
                                                                    db2 jdbc driver comes w/ db2. If you are not using a very old db2, it is possible that the classpath points to a very old copy of db2jcc.jar. The trace tells DB2 release/version, classpath, etc.
         If you are just running a simple stand-alone java application which uses jdbc APIs, you may posting your code here.
         If you are running some kind of tool which invokes db2, you may still turn jcc trace on dynamically using JVM argument:
         -Ddb2.jcc.propertiesFile=jcc.properties      following is an example of jcc.properties file:
         db2.jcc.override.traceDirectory=/temp/jcctrace      db2.jcc.override.traceFile=trace      db2.jcc.override.traceFileAppend=false      db2.jcc.override.traceLevel=-1      Regards,
         -                                      
    More...                   

    I know this is an old thread, but I just ran across this and wanted to share the fix suggested by one of our friendly DBAs.
         This link discusses the problem, https://www-304.ibm.com/support/docview.wss?uid=swg21412846 but the way we were able to work around it locally was to use the java command line argument "-Ddb2.jcc.charsetDecoderEncoder=3" which maps the funky chars to null on the way out of the DB.
         -B. Trapp                              

     
  •                                         
    jguillaumes11000093RP                             
                                               8 Posts                            

    Re: Caught java.io.CharConversionException. ERRORCODE=-4220, SQLSTATE=null

    Mar 15, 2012                                                                                 
                             This is the accepted answer.                         This is the accepted answer.                     
                                                                    I know this is an old thread, but I just ran across this and wanted to share the fix suggested by one of our friendly DBAs.
         This link discusses the problem, https://www-304.ibm.com/support/docview.wss?uid=swg21412846 but the way we were able to work around it locally was to use the java command line argument "-Ddb2.jcc.charsetDecoderEncoder=3" which maps the funky chars to null on the way out of the DB.
         -B. Trapp                                      
    More...                   

    You can also cast the column to CHAR FOR BIT DATA and do the conversion in code.

     
  •                                         
    SUGS_Brian_Trapp060001SUGS                             
                                               2 Posts                            

    Re: Caught java.io.CharConversionException. ERRORCODE=-4220, SQLSTATE=null

    Mar 15, 2012                                                                                 
                             This is the accepted answer.                         This is the accepted answer.                     
    • sasami             0600017GMX
    • Jan 8, 2011
                                                                    db2 jdbc driver comes w/ db2. If you are not using a very old db2, it is possible that the classpath points to a very old copy of db2jcc.jar. The trace tells DB2 release/version, classpath, etc.
         If you are just running a simple stand-alone java application which uses jdbc APIs, you may posting your code here.
         If you are running some kind of tool which invokes db2, you may still turn jcc trace on dynamically using JVM argument:
         -Ddb2.jcc.propertiesFile=jcc.properties      following is an example of jcc.properties file:
         db2.jcc.override.traceDirectory=/temp/jcctrace      db2.jcc.override.traceFile=trace      db2.jcc.override.traceFileAppend=false      db2.jcc.override.traceLevel=-1      Regards,
         -                                      
    More...                   

    I know this is an old thread, but I just ran across this and wanted to share the fix suggested by one of our friendly DBAs.
         This link discusses the problem, https://www-304.ibm.com/support/docview.wss?uid=swg21412846 but the way we were able to work around it locally was to use the java command line argument "-Ddb2.jcc.charsetDecoderEncoder=3" which maps the funky chars to null on the way out of the DB.
         -B. Trapp                              

(https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014550004)Topic: Caught java.io.CharConversionException. ERRORCODE=-4220, SQLSTATE=null的更多相关文章

  1. Infrastructure as Code 行为驱动开发指南 https://www.ibm.com/developerworks/cn/devops/d-bbd-guide-iac/index.html

    Infrastructure as Code 行为驱动开发指南 https://www.ibm.com/developerworks/cn/devops/d-bbd-guide-iac/index.h ...

  2. Java Content Repository API 简介 转自(https://www.ibm.com/developerworks/cn/java/j-jcr/)

    Java Content Repository API 简介 1 如果曾经试过开发内容管理应用程序,那么您应当非常清楚在实现内容系统时所遇到的固有难题.这个领地有点支离破碎,许多供应商都有自己的私有仓 ...

  3. robotframework安装和配置【转IBM:https://www.ibm.com/developerworks/cn/opensource/os-cn-robot-framework/index.html】

    内容   概览 Robot Framework 介绍 Robot Framework 的安装和配置 RIDE 编辑器介绍 创建测试项目 简单的测试用例的编写 总结 相关主题 评论   Robot Fr ...

  4. http://www.ibm.com/developerworks/cn/web/wa-aj-jsonp1/index.html

    http://www.ibm.com/developerworks/cn/web/wa-aj-jsonp1/index.html

  5. http://www.ibm.com/developerworks/cn/java/j-lo-junit-src/

    http://www.ibm.com/developerworks/cn/java/j-lo-junit-src/

  6. http://www.ibm.com/developerworks/cn/java/j-lo-hotswapcls/

    http://www.ibm.com/developerworks/cn/java/j-lo-hotswapcls/

  7. http://www.ibm.com/developerworks/cn/opensource/os-cn-cas/

    http://www.ibm.com/developerworks/cn/opensource/os-cn-cas/

  8. 使用 CAS 在 Tomcat 中实现单点登录 http://www.ibm.com/developerworks/cn/opensource/os-cn-cas/

    developerWorks 中国 技术主题 Open source 文档库 使用 CAS 在 Tomcat 中实现单点登录 单点登录(Single Sign On , 简称 SSO )是目前比较流行 ...

  9. http://www.ibm.com/developerworks/cn/web/wa-lo-firefox-ext/index.html

    <html>    <head>        <style>                textarea{                width:800p ...

随机推荐

  1. 深入HBase架构解析(一)[转]

    前记 公司内部使用的是MapR版本的Hadoop生态系统,因而从MapR的官网看到了这篇文文章:An In-Depth Look at the HBase Architecture,原本想翻译全文,然 ...

  2. vim复制内容到系统剪贴板

    vim提供了y键盘操作用于复制文本,但是复制之后的文本位于当前窗口的缓冲区中,不在系统剪贴板中,这给跨程序文本拷贝代码很来很多麻烦.搜索发现,可以使用]y指令快速将选定的文本复制到系统剪贴板中. 顺便 ...

  3. 比较正确的 iPhone7/7+ 的进入DFU的方法是这样的

    正确的.没有歧义的.在WIndows7系统下进入DFU并刷机的方法是: 1)PC端打开iTunes,数据线连接iPhone7与PC: 2)iPhone7关机: 3)同时按下电源键和音量减键,LOGO会 ...

  4. python 使用pillow将图片转换为webp格式

    1.webp格式 webp格式是谷歌开发的一种旨在加快图片加载速度的格式,将图片转为webp格式后,体积约为原来的2/3,这可以节省大量的服务器带宽,微信公众号文章里的图片就是这种格式的. 2.使用p ...

  5. SVD分解及线性最小二乘问题

    这部分矩阵运算的知识是三维重建的数据基础. 矩阵分解 求解线性方程组:,其解可以表示为. 为了提高运算速度,节约存储空间,通常会采用矩阵分解的方案,常见的矩阵分解有LU分解.QR分解.Cholesky ...

  6. 开发错误处理记录(无法激活服务,因为它不支持 ASP.NET 兼容性)

    错误提示:无法激活服务,因为它不支持 ASP.NET 兼容性.已为此应用程序启用了 ASP.NET 兼容性.请在 web.config 中关闭 ASP.NET 兼容性模式或将 AspNetCompat ...

  7. 关于centos安装后一些命令找不到

    刚才遇到那么尴尬的一个情况,输入啥命令都没找到.连ifconfig都不放过. 后分析极可能是以下两种缘故: 1.缺少安装包 [root@Tzhost-170802-FCF0 /]# yum searc ...

  8. WPF中自定义路由事件

    public class MyButtonSimple: Button { // Create a custom routed event by first registering a RoutedE ...

  9. sam9260 adc 头文件

    /* * driver/char/at91_adc.h * * Copyright (C) 2007 Embedall Technology Co., Ltd. * * Analog-to-digit ...

  10. AndroidA——背景选择器selector用法汇总(一)

    一.创建xml文件,位置:drawable/xxx.xml,同目录下记得要放相关图片 <?xml version="1.0" encoding="utf-8&quo ...