zoukankan      html  css  js  c++  java
  • ibatitsnet 因为会Dao.config 配置数据版本太低导致的问题

    ProjectReview.Test.SqlMapTest.TestSqlMap:
    IBatisNet.Common.Exceptions.ConfigurationException :
    - The error occurred while configure DaoSessionHandler.
    - The error occurred in <property name="resource" value="App_DatasqlMap.config" xmlns="http://ibatis.apache.org/dataAccess" />.
    - Check the IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler.
    ----> IBatisNet.Common.Exceptions.ConfigurationException : DaoManager could not configure SqlMapDaoSessionHandler.Cause:
    - The error occurred while loading SqlMap.
    - loading insert tag
    - The error occurred in <sqlMap embedded="PengeSoft.RFS.Maps.FileData.xml,PengeSoft.RFS" xmlns="http://ibatis.apache.org/dataMapper" />.
    - Check the InsertFileData.
    ----> IBatisNet.Common.Exceptions.ConfigurationException :
    - The error occurred while loading SqlMap.
    - loading insert tag
    - The error occurred in <sqlMap embedded="PengeSoft.RFS.Maps.FileData.xml,PengeSoft.RFS" xmlns="http://ibatis.apache.org/dataMapper" />.
    - Check the InsertFileData.
    ----> System.ArgumentException : 未找到请求的值“image”。

    解决方案: map 文件中会用到 dbType="image"   是因为Dao.config 中有的<provider name="OleDb2.0"/> 改成:<provider name="sqlServer2.0"/>

    <database>
    <provider name="OleDb2.0"/>
    <dataSource name="dbName" connectionString="Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=dbName;Data Source=local"/>
    </database>

    下面这个解决方法:原因是Provider=SQLOLEDB.1; 将其去掉就Ok 了


    ProjectReview.Test.RFSServiceTest.AddFileFormiYstByRFS:
    IBatisNet.DataAccess.Exceptions.DataAccessException : DaoProxy : unable to intercept method name 'GetDetail', cause : 不支持关键字: “provider”。
    ----> System.ArgumentException : 不支持关键字: “provider”。

  • 相关阅读:
    在 Linux 上如何挂载 qcow2 磁盘镜像
    CentOS ISO 下载地址
    构建ceph deb 安装包
    ceph 源码安装 configure: error: "Can't find boost spirit headers"
    sudo: 没有终端存在,且未指定 askpass 程序
    ubuntu14.04 下出现 libmysqlclient.so.20 找不到问题
    binary-tree-postorder-traversal leetcode C++
    binary-tree-preorder-traversal leetcode C++
    candy leetcode C++
    clone-graph leetcode C++
  • 原文地址:https://www.cnblogs.com/xiaoruilin/p/5547609.html
Copyright © 2011-2022 走看看