错误如下:
     org.springframework.jdbc.UncategorizedSQLException: (SqlMapClient operation): encountered SQLException [  
--- The error occurred in com/unc/dao/ibatis/maps/SmscList.xml.  
--- The error occurred while applying a parameter map.  
--- Check the selectSmscListClassName-InlineParameterMap.  
--- Check the statement (query failed).  
--- Cause: java.sql.SQLException: 关闭的连接]; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/unc/dao/ibatis/maps/SmscList.xml.  
--- The error occurred while applying a parameter map.  
--- Check the selectSmscListClassName-InlineParameterMap.  
--- Check the statement (query failed).  
--- Cause: java.sql.SQLException: 关闭的连接
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/unc/dao/ibatis/maps/SmscList.xml.  
--- The error occurred while applying a parameter map.  
--- Check the selectSmscListClassName-InlineParameterMap.  
--- Check the statement (query failed).  
--- Cause: java.sql.SQLException: 关闭的连接
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:185)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:615)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:589)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:95)
at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:245)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:165)
at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:204)
at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:243)
at com.unc.dao.ibatis.SqlMapSmscListDAO.selectSmscListClassName(SqlMapSmscListDAO.java:54)
at com.unc.services.imp.ListServiceImpl.selectSmscListClassName(ListServiceImpl.java:78)
at com.unc.timing.TimingTask.getSendMessage(TimingTask.java:98)
at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:222)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:165)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:66)
at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
Caused by: java.sql.SQLException: 关闭的连接
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:207)
at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java:3520)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3265)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3389)
at com.caucho.sql.UserPreparedStatement.execute(UserPreparedStatement.java:126)
at com.caucho.sql.UserPreparedStatement.execute(UserPreparedStatement.java:126)
at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.ibatis.common.jdbc.logging.PreparedStatementLogProxy.invoke(PreparedStatementLogProxy.java:62)
at $Proxy3.execute(Unknown Source)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:186)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
... 20 more
2008-06-27 05:47:07,995 INFO [org.quartz.core.JobRunShell] - Job DEFAULT.timingJob threw a JobExecutionException: 
请各位朋友帮你个忙看看 是什么原因呢?spring+ibatis连接Oracle

解决方案 »

  1.   

    此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
    楼主【YippeeYang】截止到2008-06-27 10:05:54的历史汇总数据(不包括此帖):
    发帖数:7                  发帖分:45                 
    结贴数:5                  结贴分:40                 
    未结数:2                  未结分:5                  
    结贴率:71.43 %            结分率:88.89 %            
    楼主加油
      

  2.   

    The error occurred in com/unc/dao/ibatis/maps/SmscList.xml.  
    --- The error occurred while applying a parameter map.  
    把相应的xml代码帖下
      

  3.   

    SmscList.xml
    可能是这里引起的问题,把它贴出来看看。
      

  4.   

    SmscList.xml :<select id="selectSmscListClassName" parameterClass="smscList" resultClass="smscList">
    <![CDATA[
    SELECT list.MSG_LIST_ID as msgListId,
               list.OPERATION_CODE as operationCode,
                   list.MESSAGE as message,
                   list.MOBILE as mobile, 
                   list.SEND_TIME as sendTime,  
                   list.IS_SEND as isSend,
                   list.COUNT as count,
                   list.PRIORITY as priority,
            ser.class_name as className
    FROM SMSC_MSG_LIST list,smsc_operation op,smsc_app app,smsc_server ser,smsc_enter en 
    where list.is_send in(0) and list.operation_code=op.operation_code
    and send_time<=sysDate and op.enter_code=en.enter_code
    and op.app_code=app.app_code and app.server_id=ser.server_id and rownum <= #rowNum#
         order by list.is_send desc,priority desc 
         ]]>
    </select>
      

  5.   

    SELECT list.MSG_LIST_ID as msgListId,
            list.OPERATION_CODE as operationCode,
                  list.MESSAGE as message,
                  list.MOBILE as mobile,
                  list.SEND_TIME as sendTime,
                  list.IS_SEND as isSend,
                  list.COUNT as count,
                  list.PRIORITY as priority,
            ser.class_name as className
    FROM SMSC_MSG_LIST list,smsc_operation op,smsc_app app,smsc_server ser,smsc_enter en
    where list.is_send in(0) and list.operation_code=op.operation_code
    and send_time <=sysDate and op.enter_code=en.enter_code
    and op.app_code=app.app_code and app.server_id=ser.server_id and rownum <= #rowNum#
        order by list.is_send desc,priority desc 把#rowNum#换成固定值,到数据库执行以下,看看好使不
      

  6.   

    java.sql.SQLException: 关闭的连接
    这个可能是数据库连接池的问题,说明这次交互没有得到 数据连接源
    大家看看是这样么?
      

  7.   

    http://www.javaeye.com/article/32009
    刚搜的
      

  8.   

    1、你调用其他sql方法查询是否正确 如果没问题 证明你的数据库链接有问题
    2、检查selectSmscListClassName方法,sql语句对吗
      

  9.   


    别的sql方法都能执行,selectSmscListClassName这个方法的语句也能执行。