问题描述
爆异常的SQL:selectnounName,nounvaluefromSYS_NounwherenounSuper='0169'andnounvalidity='1'orderbyNOUNORDER,nounid是拼装的SQL报出的异常:org.springframework.jdbc.BadSqlGrammarException:SqlMapClientoperation;badSQLgrammar[];nestedexceptioniscom.ibatis.common.jdbc.exception.NestedSQLException:---Theerroroccurredincom/shunde/admin/dict/sqlmap/sysNoun.xml.---Theerroroccurredwhileapplyingaresultmap.---CheckthequeryDictDefinParamBySql-AutoResultMap.---Checktheresultmappingforthe'nounID'property.---Cause:java.sql.SQLException:列名无效atorg.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:220)atorg.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)atorg.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:212)atorg.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:249)atorg.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:296)atcom.shunde.admin.dict.dao.support.DicDaoImpl.getDictList(DicDaoImpl.java:257)atcom.shunde.admin.dict.service.support.DicServiceImpl.queryDictList(DicServiceImpl.java:179)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atorg.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)atorg.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)atorg.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)atorg.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at$Proxy4.queryDictList(UnknownSource)atcom.shunde.common.tags.DictListTag.selectTag(DictListTag.java:130)atcom.shunde.common.tags.DictListTag.doStartTagInternal(DictListTag.java:73)atorg.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:77)atorg.apache.jsp.erms.rc.queryItVCustInfo_jsp._jspx_meth_dict_005fdictList_005f1(queryItVCustInfo_jsp.java:738)atorg.apache.jsp.erms.rc.queryItVCustInfo_jsp.access$7(queryItVCustInfo_jsp.java:716)atorg.apache.jsp.erms.rc.queryItVCustInfo_jsp$queryItVCustInfo_jspHelper.invoke1(queryItVCustInfo_jsp.java:1513)atorg.apache.jsp.erms.rc.queryItVCustInfo_jsp$queryItVCustInfo_jspHelper.invoke(queryItVCustInfo_jsp.java:1721)atorg.apache.jsp.tag.web.ptags_005fnew_005fcp.searchlayout_tag.doTag(searchlayout_tag.java:75)atorg.apache.jsp.erms.rc.queryItVCustInfo_jsp._jspx_meth_p_005fsearchlayout_005f0(queryItVCustInfo_jsp.java:637)atorg.apache.jsp.erms.rc.queryItVCustInfo_jsp.access$0(queryItVCustInfo_jsp.java:627)atorg.apache.jsp.erms.rc.queryItVCustInfo_jsp$queryItVCustInfo_jspHelper.invoke0(queryItVCustInfo_jsp.java:1456)atorg.apache.jsp.erms.rc.queryItVCustInfo_jsp$queryItVCustInfo_jspHelper.invoke(queryItVCustInfo_jsp.java:1718)atorg.apache.jsp.tag.web.ptags_005fnew_005fcp.pagelayout_tag.doTag(pagelayout_tag.java:75)atorg.apache.jsp.erms.rc.queryItVCustInfo_jsp._jspService(queryItVCustInfo_jsp.java:388)atorg.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)atorg.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)atorg.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)atorg.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)atorg.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)atorg.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)atorg.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)atorg.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)atorg.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:690)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.shunde.rdp.util.FilterUtil.doFilter(FilterUtil.java:42)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.opensymphony.filter.EncodingFilter.doFilter(EncodingFilter.java:47)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.shunde.security.LogFilter.doFilter(LogFilter.java:67)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.shunde.security.SecurityFilter.doFilter(SecurityFilter.java:92)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)atjava.lang.Thread.run(Thread.java:619)Causedby:com.ibatis.common.jdbc.exception.NestedSQLException:---Theerroroccurredincom/shunde/admin/dict/sqlmap/sysNoun.xml.---Theerroroccurredwhileapplyingaresultmap.---CheckthequeryDictDefinParamBySql-AutoResultMap.---Checktheresultmappingforthe'nounID'property.---Cause:java.sql.SQLException:列名无效atcom.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:201)atcom.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)atcom.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)atcom.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)atcom.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)atorg.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:298)atorg.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:209)...72moreCausedby:java.sql.SQLException:列名无效atoracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)atoracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)atoracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:207)atoracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3294)atoracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1913)atoracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1514)atsun.reflect.GeneratedMethodAccessor36.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atcom.ibatis.common.jdbc.logging.ResultSetLogProxy.invoke(ResultSetLogProxy.java:47)at$Proxy205.getString(UnknownSource)atcom.ibatis.sqlmap.engine.type.StringTypeHandler.getResult(StringTypeHandler.java:35)atcom.ibatis.sqlmap.engine.mapping.result.ResultMap.getPrimitiveResultMappingValue(ResultMap.java:619)atcom.ibatis.sqlmap.engine.mapping.result.ResultMap.getResults(ResultMap.java:345)atcom.ibatis.sqlmap.engine.mapping.result.AutoResultMap.getResults(AutoResultMap.java:47)atcom.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:419)atcom.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:335)atcom.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:224)atcom.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)at