Java 存储过程iBATIS调用异常
我被指派去解决别人申请中的一个事件 但是,应用程序在iBATIS中使用了sqlMap和存储过程,我以前从未使用过它 这就是我到目前为止所做的:Java 存储过程iBATIS调用异常,java,sql,ibatis,Java,Sql,Ibatis,我被指派去解决别人申请中的一个事件 但是,应用程序在iBATIS中使用了sqlMap和存储过程,我以前从未使用过它 这就是我到目前为止所做的: public void createItemInDb() { try { System.out.println("status: " + this.getStatus()); System.out.println("weight: " + this.getWeight()); System.out
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();
}
}
//xml文件中的sqlMap
<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>
我甚至不明白这部分的意思:
找不到*N类型*N中的CREATEITEM
N代表什么
在哪里可以找到存储过程?在其他任何地方的应用程序文件中都找不到CREATEITEM
Thnx存储过程在数据库中,您必须使用数据库客户端连接到数据库,并检查存储过程的代码(可能是PL/SQL代码)
错误“CREATEITEM in*N type*N not found.”可能是由存储过程的返回类型引起的。您确定它是整数吗?存储过程在数据库中,您必须使用数据库客户端连接到数据库并检查存储过程的代码(可能是PL/SQL代码)
错误“CREATEITEM in*N type*N not found.”可能是由存储过程的返回类型引起的。您确定它是整数吗?谢谢您的回答。IT部门有人设法删除了我们所有的存储过程。这就是异常的原因,也是我在任何地方都找不到它的原因。幸运的是,我们最近有一个备份,现在所有问题都解决了。谢谢你的回答。IT部门有人设法删除了我们所有的存储过程。这就是异常的原因,也是我在任何地方都找不到它的原因。幸运的是,我们最近有一个备份,现在已经全部解决了。
--- 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)