【问题标题】:Ibatis parameter initialization issueibatis参数初始化问题
【发布时间】:2011-03-10 15:26:52
【问题描述】:

我的应用程序在将参数映射初始化为 sql 语句时出现异常。错误是:

Caused By: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in /com/***/cusman/cusbilman/postpaid/main/product/data/ibatis/sqlMap/THSSqlMap.xml.
--- The error occurred while applying a parameter map.
--- Check the invoicing.invoice.ths.paymentInfoMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: ORA-00904: : invalid identifier
        at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:201)
        at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
        at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
        at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
        at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
        at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:298)
        at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:209)
        at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:249)
        at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:296)

定义是完全持久的(我的意思是 java 端和 xml 端)。

有什么想法吗?

【问题讨论】:

    标签: sql parameter-passing ibatis sqlexception


    【解决方案1】:

    我找到了。问题是,oracle 没有错误的堆栈跟踪类型定义。我在选择中使用了一个函数,但我的数据库用户没有获得执行它的授权,所以愚蠢的 Oracle 试图运行它,函数名是列名。所以它找不到像它这样的列名。所以它隐藏了真正的问题......

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-25
      • 2011-10-13
      • 2011-10-29
      相关资源
      最近更新 更多