Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Java code runs normally through Eclipse but gives Encoding error thru cmd

I am executing the following query given below through Eclipse and cmd in Windows NT enviroment.

Statement stBMS = ConBMS.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
String myQuery = "SELECT AL1.APPL_NM, AL1.DATA_CAT_CD, AL1.GEO_NM, AL1.CTRY_CD, AL1.CMPNY_CD, AL1.JOB_NM, AL1.JOB_RUN_TMS, AL1.JOB_CMPLTN_IND FROM BMS.IW_CONTRO AL1 WHERE (AL1.APPL_NM='BCSDM ' AND AL1.DATA_CAT_CD='CURRLBR ' AND DATE(AL1.JOB_RUN_TMS) >= CURRENT DATE AND AL1.JOB_CMPLTN_IND='Y')";
ResultSet rsBMS = stBMS.executeQuery(myQuery);

It runs normally through Eclipse but when i run it thru cmd i get the following error:-

Exception:Encoding not supported!! DB2ConnectionCorrelator: G9339865.ND54.
01F9C9142526encoding not supported!! DB2ConnectionCorrelator: G9339865.ND54.01F
9C9142526
com.ibm.db2.jcc.b.DisconnectException: encoding not supported!! DB2ConnectionCo
rrelator: G9339865.ND54.01F9C9142526
[1017 byte] By [sanketsao] at [2007-11-11 10:16:51]
# 1 Re: Java code runs normally through Eclipse but gives Encoding error thru cmd
can you please confirm whether you are using the same jdbc db2 driver in both the scenarios. I think an old version of driver is added in the classpath.
sudheerprem at 2007-11-11 22:31:43 >
# 2 Re: Java code runs normally through Eclipse but gives Encoding error thru cmd
Ya i am using same jdbc db2 driver in both the scenarios.

can you please confirm whether you are using the same jdbc db2 driver in both the scenarios. I think an old version of driver is added in the classpath.
sanketsao at 2007-11-11 22:32:44 >