分享

Mapped Statements collection does not contain value for

 I_T_馆 2014-12-01
今天在调用喜洋洋写的企业层的代码是,报如下错误:

 java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for 
com.gaiay.enterprise.dao.XyCompanyProfileMapper.insert
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:672)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:507)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:500)
at org.apache.ibatis.binding.MapperMethod.setupCommandType(MapperMethod.java:240)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:71)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:39)
at com.sun.proxy.$Proxy20.insert(Unknown Source)

 
 
经查询网络后找到原因:没有将当前使用的这个xml配置文件添加到sqlMapConfig.xml配置文件中。


网上说还有一种情况,就是没有将sqlMapConfig.xml配置文件添加到sessionFactory中。

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多