1
我被分配来解决某人在别人应用程序中发生的事件。使用存储过程调用存储过程的异常iBATIS
但是,应用程序使用sqlMap和存储过程与iBATIS和我从来没有用过这个之前。
这是我到目前为止有:
public void createItemInDb() {
try {
System.out.println("status: " + this.getStatus());
System.out.println("weight: " + this.getWeight());
System.out.println("node name: " + this.getNodeName());
System.out.println("node ui: " + this.getNodeUi());
SqlMapClient sqlMap = AppSqlMapClient.getSqlMapInstance();
sqlMap.queryForObject("createItem", this);
} catch (SQLException e) {
e.printStackTrace();
}
}
// SQLMAP xml文件中
<parameterMap class="item" id="createItemMap">
<parameter property="nodeName" jdbcType="VARCHAR" mode="IN" />
<parameter property="status" jdbcType="INTEGER" mode="IN" />
<parameter property="weight" jdbcType="INTEGER" mode="IN" />
<parameter property="nodeUi" jdbcType="INTEGER" mode="INOUT" />
</parameterMap>
<procedure id="createItem" parameterMap="createItemMap">
{call CREATEITEM (?,?,?,?)}
</procedure>
我有此异常:
--- The error occurred while executing query procedure.
--- Check the {call CREATEITEM (?,?,?,?)}.
--- Check the SQL Statement (preparation failed).
--- Cause: java.sql.SQLException: [SQL0204] CREATEITEM in *N type *N not found.
Caused by: java.sql.SQLException: [SQL0204] CREATEITEM in *N type *N not found.
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:185)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:565)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:540)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:84)
我甚至不明白这部分是什么意思:
CREATEITEM in * N type * N not found。
* N代表什么?
我在哪里可以找到存储过程?在其他地方的应用程序文件中找不到CREATEITEM?
日Thnx
谢谢你的回答。 IT部门的人员已经成功清除了我们所有的存储过程。这是例外的原因,为什么我无法在任何地方找到它。幸运的是,我们最近已经备份并且现在全部解决了。 –
好!问题解决了! ;) – TeoVr81