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