iBatis中报 java.sql.SQLException: 无效的列类型异常

本文解析了一条关于Spring框架中JDBC操作引发的UncategorizedSQLException错误。错误发生在尝试获取个人基本信息列表时,提示无效的列类型。文章详细分析了问题出现在参数映射过程中的DEPT_NO属性,并提供了相应的解决办法。

错误信息

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Request processing failed; 
nested exception is org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; 
uncategorized SQLException for SQL []; SQL state [null]; error code [17004];   
--- The error occurred while applying a parameter map.  
--- Check the ess.viewApply.getEssPersonalInfoList-InlineParameterMap.  
--- Check the parameter mapping for the 'DEPT_NO' property.  
--- Cause: java.sql.SQLException: 无效的列类型; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred while applying a parameter map.  
--- Check the ess.viewApply.getEssPersonalInfoList-InlineParameterMap.  
--- Check the parameter mapping for the 'DEPT_NO' property.  
--- Cause: java.sql.SQLException: 无效的列类型
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    com.ait.web.filter.UserAuthenFilter.doFilter(UserAuthenFilter.java:77)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

关键点XML SQL

    <![CDATA[
                AND     EXISTS (SELECT *
                              FROM HR_DEPARTMENT B1
                             WHERE B1.DEPTNO = B.DEPTNO
                             START WITH B1.DEPTNO = #DEPT_NO#
                           CONNECT BY PRIOR B1.DEPTNO = B1.PARENT_DEPT_NO)
            ]]>   

参数传值

{interLanguage=zh, interCpnyID=C11, orderField=, orderDirection=asc, specialParam=special, 
 AR_SUPERVISIOR_INFO=30044292, userNo=36911, 
 deptNo=C114, ADMIN_ID=30044292, CREATED_BY=30044292, UPDATED_BY=30044292, PERSON_ID=30044292, CPNY_ID=C11}

public class ViewApplySerImpl implements ViewApplySer {

 Line 55 paramMap.put("DEPT_NO", admin.getDeptNo());

问题点

黄色部分参数名称不对应

故改之

转载于:https://www.cnblogs.com/cici-new/archive/2013/01/25/2876450.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值