Ibatis参数初始化问题
我的应用程序在将参数映射初始化为 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端)。
有什么想法吗?
My application is having an exception about initialization of a parametermap into an sql statement. The error is :
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)
The definitions are totally persistent which each other(java side and the xml side I mean).
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了。问题是,oracle 没有错误的堆栈跟踪类型定义。我在 select 中使用了一个函数,但我的 db 用户没有获得执行它的权限,所以 Stupid Oracle 尝试像函数名称是列名称一样运行它。所以它找不到类似的列名。所以它隐藏了真正的问题......
I found it. The problem is, oracle has not a stack trace type definition for errors. I was using a function in a select, but my db user had not got the grant to execute it, so Stupid Oracle tried to run it like, the function name is a column name. So it could not find a column name like it. So it hide the real problem...