凭证引入接口 报错
金蝶云社区-云中雾
云中雾
0人赞赏了该文章 1,635次浏览 未经作者许可,禁止转载编辑于2016年08月16日 18:59:48

调用eas凭证导入接口时报从来没遇到过的错误,eas版本是eas8.1,接口是ormrpc/services/WSWSVoucher?wsdl
之前调用7.0或者7.5的均为同样方式也没有报错,这个报错的代码 反编译发现WSVoucherControllerBean类在eas里面有两个 一个是在标准server的jar


这个包中没有1303这个行号,断定后台执行的是sp的jar中的代码

反编译后找到错误行号 1303 ,这里报出空指针,应该是profitCenterMap为空,或者profitCenterNumber为空,然后 不知道为啥会报错。
at com.kingdee.bos.rpc.impl.ThreadPool2$Worker.run(ThreadPool2.java:140)
Caused by: java.lang.reflect.UndeclaredThrowableException: TxEJB wrap a Not_BaseException while Reflect Invoke ControllerBean.
at com.kingdee.bos.transaction.EJBTxFacade.TxInvokerBean.invoke(TxInvokerBean.java:161)
at com.kingdee.bos.transaction.EJBTxFacade.TxInvokerBean.INVOKE_SUPPORTS(TxInvokerBean.java:64)
... 13 more
Caused by: java.lang.NullPointerException
at com.kingdee.eas.fi.gl.app.WSVoucherControllerBean.importVoucher(WSVoucherControllerBean.java:1303)

反编译到的报错位置
[code]/* 1295 */ entrySeq = wsVoucher.getEntrySeq();
/* 1296 */ asstCountSeq = 0;
/* 1297 */ if ((preentrySeq == -1000) || (preentrySeq != entrySeq)) {
/* 1298 */ preentrySeq = entrySeq;
/* 1299 */ asstCountSeq = 1;
/* */
/* 1301 */ profitCenterNumber = wsVoucher.getProfitCenterNumber();
/* 1302 */ profitCenterOrgUnitInfo = null;
/* 1303 */ if ((profitCenterMap.containsKey(profitCenterNumber)) && (profitCenterMap.get(profitCenterNumber) != null)) {
/* 1304 */ profitCenterOrgUnitInfo = (ProfitCenterOrgUnitInfo)profitCenterMap.get(profitCenterNumber);
/* */ } else {
/* 1306 */ profitCenterOrgUnitInfo = GlWebServiceUtil.findProfitCenterOrgByNumber(ctx, profitCenterNumber);
/* 1307 */ if (profitCenterOrgUnitInfo != null) {
/* 1308 */ profitCenterMap.put(profitCenterNumber, profitCenterOrgUnitInfo);
/* */ }
/* */
/* */ }
/* */
[/code]