当前位置: 代码迷 >> SQL >> There is no statement named xxx in this SqlMap 让小弟我很莫名
  详细解决方案

There is no statement named xxx in this SqlMap 让小弟我很莫名

热度:133   发布时间:2016-05-05 13:45:34.0
There is no statement named xxx in this SqlMap 让我很莫名

com.ibatis.sqlmap.client.SqlMapException: There is no statement named Control.insert-control in this SqlMap.
?????????????? at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.getMappedStatement(
SqlMapExecutorDelegate.java:231)
?????????????? at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(
SqlMapExecutorDelegate.java:367)
?????????????? at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(
SqlMapSessionImpl.java:82)
?????????????? at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(
SqlMapClientImpl.java:58)

我已经在Control.xml里加了Control.insert-control,问题依然在。

最后查找之下,原来在SqlMapConfig.xml里没有加上(应该是以前加过,当svn出问题后SqlMapConfig.xml没commit,直接checkout来了,SqlMapConfig.xml没更新到引起的)
<sqlMap resource="com/xxx/dao/mysql/Control.xml"/>

  相关解决方案