因为我这边测试环境没有问题,现场有问题,所以使用现场的日志信息来判断错误原因! 日志如下: INFO [Thread-2] [2011-10-25 13:40:47.669] (MMSFetchImp.java:363) SQL:select * from tbl_MMSingleSendCONTENT mms where foreignid = ? order by foreignID,sequence INFO [Thread-2] [2011-10-25 13:40:47.670] (MMSFetchImp.java:371) SQL语句:select * from tbl_MMSingleSendCONTENT mms where foreignid ='111025134045381' order by foreignID,sequence ERROR [Thread-2] [2011-10-25 13:40:47.689] (MMSFetchImp.java:382) fetch mmssinglecontent error:null java.lang.NullPointerException at com.ibm.db2.jcc.b.zc.a(zc.java:1234) at com.ibm.db2.jcc.a.db.n(db.java:589) at com.ibm.db2.jcc.a.db.j(db.java:257) at com.ibm.db2.jcc.a.db.c(db.java:57) at com.ibm.db2.jcc.a.r.c(r.java:42) at com.ibm.db2.jcc.a.sb.h(sb.java:169) at com.ibm.db2.jcc.b.zc.p(zc.java:1223) at com.ibm.db2.jcc.b.ad.d(ad.java:2246) at com.ibm.db2.jcc.b.ad.U(ad.java:489) at com.ibm.db2.jcc.b.ad.executeQuery(ad.java:472) at com.***.utils.db.PooledPreparedStatement.executeQuery(PooledPreparedStatement.java:46) at com.***.eie.mms.core.MMSFetchImp.getMMSSingleContent(MMSFetchImp.java:373) at com.***.eie.mms.core.MMSDealImp.transferTaskToMMSSingleMessage(MMSDealImp.java:437) at com.***.eie.mms.core.MMSDealImp.dispatchTaskToMessage(MMSDealImp.java:80) at com.***.eie.mms.mmsthread.MMSDealThread.run(MMSDealThread.java:37)
日志可以看出执行完这一步后就出问题了。
log.info("SQL语句:select * from tbl_MMSingleSendCONTENT mms where foreignid ='"+ foreignid + "' order by foreignID,sequence");