当前位置: 代码迷 >> Java Web开发 >> ibatis+spring+struts 有时候抛出这个错误,有时没有,那个页面每次点击都很慢
  详细解决方案

ibatis+spring+struts 有时候抛出这个错误,有时没有,那个页面每次点击都很慢

热度:5371   发布时间:2013-02-25 21:20:17.0
ibatis+spring+struts 有时候抛出这个异常,有时没有,那个页面每次点击都很慢,
SqlMapClient operation; SQL []; 
--- The error occurred in com/ck/mcbnrt/model/OrFdrConfirm.xml. 
--- The error occurred while applying a result map. 
--- Check the OrFdrConfirm.orFdrConfirm. 
--- The error happened while setting a property on the result object. 
--- Cause: java.sql.SQLException: Io 异常: Socket closed; 
nested exception is com.ibatis.common.jdbc.exception.NestedSQLException
--- The error occurred in com/ck/mcbnrt/model/OrFdrConfirm.xml. 
--- The error occurred while applying a result map. 
--- Check the OrFdrConfirm.orFdrConfirm. 
--- The error happened while setting a property on the result object. 
--- Cause: java.sql.SQLException: Io 异常: Socket closed


*********************配置xml*************************
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" 
"http://ibatis.apache.org/dtd/sql-map-2.dtd" >


<sqlMap namespace="OrFdrConfirm">
<resultMap id="orFdrConfirm"
class="com.ck.mcbnrt.model.OrFdrConfirm">
<result column="partner_carrier_cd" property="partnerCarrierCd"
jdbcType="VARCHAR" />
<result column="serv_carrier_cd" property="servCarrierCd"
jdbcType="VARCHAR" />
<result column="file_nm" property="fileNm" jdbcType="VARCHAR" />
<result column="record_count" property="recordCount"
jdbcType="NUMBER"/>
<result column="nr_count" property="nrCount" jdbcType="NUMBER"/>
<result column="diff" property="diff" jdbcType="NUMBER"/>
<result column="gen_tm" property="genTm" jdbcType="DATE"/>
</resultMap>


  <select id="queryOrFdrConfirm" parameterClass="java.util.Map"
  resultMap="orFdrConfirm">
  select * from (select rownum rownum_,row_.* from (select partner_carrier_cd,
  serv_carrier_cd,
  file_nm,
  record_count,
  nr_count,
  nr_count - record_count as diff,
  gen_tm
  from (select partner_carrier_cd,
  serv_carrier_cd,
  file_nm,
  record_count,
  gen_tm,
  (select count(rowid)
  from nrtdba.ic_nr_file t2
  where t2.fdr_file_nm = t.file_nm
  and t2.partner_carrier_cd = t.partner_carrier_cd ) as nr_count
  from (
   
  select t1. partner_carrier_cd,
  t1.serv_carrier_cd,
  t1.file_nm,
  t1.record_count,
  t1.gen_tm
  from nrtdba.og_fdr_file t1
  where t1.gen_tm between TO_DATE('2012-05-10','yyyy-MM-dd') and TO_DATE('2012-05-10','yyyy-MM-dd')
   
  ) t)
 order by diff desc 
 <![CDATA[)row_ where rownum <= 30) where rownum_ > 0]]>
  </select>

<select id="queryOrFdrConfirmCount" parameterClass="java.util.Map"
resultClass="long">
select count(*) from nrtdba.og_fdr_file t1 where
to_date(to_char(t1.gen_tm, 'yyyy-MM-dd'), 'yyyy-MM-dd') between
#bGenTm# and #eGenTm#
  相关解决方案
本站暂不开放注册!
内测阶段只得通过邀请码进行注册!
 
  • 最近登录:Sat May 26 06:20:10 CST 2018
  • 最近登录:Sat May 26 06:20:10 CST 2018
  • 最近登录:Sat May 26 06:20:10 CST 2018
  • 最近登录:Sat May 26 06:20:10 CST 2018
  • 最近登录:Sat May 26 06:20:10 CST 2018