找回密码
 注册成为天翎用户
查看: 2684|回复: 15

接口调用时,tomcat出现大量警告

[复制链接]
summer 发表于 2012-9-28 14:29:57 | 显示全部楼层 |阅读模式
本帖最后由 purple 于 2012-9-28 23:42 编辑


调用平台的documentservice接口,数据库连接的是oracle。
tlk_打折申请的表清空后,调用平台接口的函数时,出现上图的警告,同时在自己的函数返回值中有数据。照理说,表中的数据清空后,函数不应该获取这条记录的。求助

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册成为天翎用户

×
shary 发表于 2012-9-28 14:39:05 | 显示全部楼层
您好,tomcat警告窗口是因为您的后台的系统管理的邮件主机设置的是www.teemlink.com。这个是我们公司的邮件服务器主机。因为您的那个密码是错误的。因而会报出大量的连接失败的警告。跟你的webservice接口没关。
回复

使用道具 举报

 楼主| summer 发表于 2012-9-28 14:42:59 | 显示全部楼层
本帖最后由 summer 于 2012-9-28 14:45 编辑

回复 2# shary


    那么我读出的脏数据呢?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册成为天翎用户

×
回复

使用道具 举报

shary 发表于 2012-9-28 14:45:20 | 显示全部楼层
回复 3# summer


    您所谓的问题麻烦贴出您的代码,您只是告知现象并没有告知具体是哪个函数或者代码引起的。
回复

使用道具 举报

 楼主| summer 发表于 2012-9-28 14:46:52 | 显示全部楼层
本帖最后由 summer 于 2012-9-28 14:49 编辑

回复 4# shary


    docService.searchDocumentsByFilter(this._formName, checkMap,this._appId , this._userId);
这个函数,截图是3#。
我是先清空数据库的数据,没有选择平台的“清除数据按钮”
回复

使用道具 举报

shary 发表于 2012-9-28 14:58:25 | 显示全部楼层
您好,您有调用searchDocumentsByFilter,您的第一个参数对应的表应该是“打折申请”吧。这个函数数去查这个表的数据。您3#贴出的sql是查这个表的记录数。即使这个表没有数据也是需要查记录数吧,不然怎么知道这个表里没数据,从而不返回数据呢。
回复

使用道具 举报

 楼主| summer 发表于 2012-9-28 15:05:21 | 显示全部楼层
可是,我数据库中的这张表单里没数据,我自己的函数返回值,显示存在我要查询的记录,
每次都会有
line 1:1 unexpected token:null
<ast>:0:0 unexpected end of subtree
回复

使用道具 举报

shary 发表于 2012-9-28 15:08:25 | 显示全部楼层
这个显示查出的是空啊。麻烦检查下您自己的函数是否有问题。谢谢
回复

使用道具 举报

 楼主| summer 发表于 2012-9-28 15:12:38 | 显示全部楼层
本帖最后由 summer 于 2012-9-28 15:18 编辑

public String startFlow(String jsonParameters ,String domainUserId) {
                String result = "noStart";
                try {
                       
                        //转换成json格式
                        jsonObj = new JSONObject(jsonParameters);
                        if(checkArgument(jsonObj) && checkArgument(domainUserId)){
                                this._parameters = convertJson2Hash(jsonObj);
                                //this._parameters.put("createUserId", domainUserId);
                                this._userId = domainUserId;
                               
                                //获取接口
                                docLocator = new DocumentServiceServiceLocator();
                                docLocator.setDocumentServiceEndpointAddress(docEndpointAddress);
                                URL url = new URL(docEndpointAddress+"?wsdl");
                                docService = docLocator.getDocumentService();

                                //检验该单子是否存在
                                HashMap checkMap = new HashMap();
                                checkMap.put("examNumber", jsonObj.get("examNumber"));
                                Object[] objs = docService.searchDocumentsByFilter(this._formName, checkMap,this._appId , this._userId);
                               
                               
                                if(objs != null  && objs.length > 0){
                                        System.out.println(objs.length);
                                        int countRecorder = 0;
                                        for(int i = 0;i< objs.length; i++){
                                                SimpleDocument tmp = (SimpleDocument) objs;                                                
                                                String dbExamNumber =  (String) tmp.getItems().get("examNumber");                                               
                                               
                                                if(jsonObj.getString("examNumber").equals(dbExamNumber)){
                                                        String label = tmp.getStateLabel();
                                                        result = "订单已存在,流程状态是("+label+")";
                                                        if(label.equals("结束")){
                                                                Double itemDiscount = (Double) tmp.getItems().get("discount");
                                                                Double nonItemDiscount = (Double) tmp.getItems().get("notItemDiscount");
                                                                result  += "。体检项目折扣率是:"+itemDiscount+"%;非体检项目折扣率是:"+nonItemDiscount+"%";
                                                        }
                                                        break;
                                                }
                                                else {
                                                        countRecorder++;       
                                                        if(countRecorder == objs.length){
                                                                _parameters.put("_flowid", this._flowId);
                                                                //新建一条订单,返回docId
                                                                String str = docService.createDocumentByDomainUser(this._formName, this._parameters,this._userId,this._appId );
                                                                //获取该订单的流程状态
                                                                result = "新建表单,流程状态是("+getFlowLabel((String)jsonObj.get("examNumber"), this._userId)+")";
                                                        }
                                                }                                               
                                        }
                                }                               
                                else{
                                        _parameters.put("_flowid", this._flowId);
                                        //新建一条订单,返回docId
                                        String str = docService.createDocumentByDomainUser(this._formName, this._parameters,this._userId,this._appId );
                                        //获取该订单的流程状态
                                        result = "新建表单,流程状态是("+getFlowLabel((String)jsonObj.get("examNumber"),this._userId)+")";
                                }
                        }
                        else{
                                result = "parameters are not correct,please check";
                                 
                        }
                       
                } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                        result = e.toString();
                }
                System.out.println(result);
                return result;               
               
        }

后台打印的objs.length是1,我就调用了你们的searchDocumentsByFilter,却返回了脏数据,请问到底是谁的函数错误?
回复

使用道具 举报

shary 发表于 2012-9-28 16:20:52 | 显示全部楼层
您的这个问题跟http://www.teemlink.com/bbs/view ... &extra=page%3D1是同一个问题。可能是缓存引起的。
回复

使用道具 举报

本版积分规则

手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-14 07:17

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表