iBatis中報 java.sql.SQLException: 無效的列類型異常


錯誤信息

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());

問題點

黃色部分參數名稱不對應

故改之


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM