ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandre Grenier" <Alex.Gren...@markettools.com>
Subject Could not configure ResultMap
Date Wed, 03 May 2006 15:12:42 GMT
Hello all,

I'm considering iBatis to help rewriting a quite large project -
terabyte size db. 
The first step is to write unit tests to prove iBatis can handle it
(some people are not as enthusiastic as I am).

I've got the source from the SVN trunk and compiled it using VS 2005. I
then proceeded with the instructions as per the doc.
Then I created the first ResultMap file and a unit test to get an
instance of the Mapper.

Below I will post in order the simple unit test, the resultmap, and the
error. Any help in getting past this error is greatly appreciated,
because after spending a few hours trying to figure it out, I have
absolutely no clue. I hope it's a stupid oversight from my part.



        [Test]
        public void TestMapperInstance()
        {
            SqlMapper mapper = Mapper.Get();
            Assert.IsNotNull(mapper, "Mapper must not be null.");
        }




<?xml version="1.0" encoding="utf-8" ?> 

<sqlMap 
	namespace="Domain" 
  xmlns="http://ibatis.apache.org/mapping"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

	<!-- XML "behind" document for the Account service class. -->

	<alias>

    <typeAlias alias="AccountAuthenticateParam"
type="Domain.Tests.AccountAuthenticateParam, Domain" />

  </alias>
	
	<resultMaps>

    <resultMap id="AAPResult" class="AccountAuthenticateParam">
      <result property="Email" column="email" />
      <result property="Password" column="password" />
    </resultMap>

  </resultMaps>

</sqlMap>




Domain.Tests.TestMapper.TestMapperInstance :
IBatisNet.Common.Exceptions.ConfigurationException : 
- The error occurred while loading SqlMap.
- initialize ResultMap
- The error occurred in <sqlMap resource="AccountMap.xml"
xmlns="http://ibatis.apache.org/dataMapper" />.  
- Check the Domain.AAPResult.
  ----> IBatisNet.Common.Exceptions.ConfigurationException : Could not
configure ResultMap. ResultMap named "AAPResult" not found, failed. 
 Cause: Object reference not set to an instance of an object.



Note, whatever ID I give to the result map is the ID that will appear in
the error.


Thanks!


Alexandre Grenier


Mime
View raw message