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 RE: Could not configure ResultMap
Date Wed, 03 May 2006 18:28:16 GMT

As well, here is the actual class mapped to:

    class AccountAuthenticateParam
    {
        private string email;
        public string Email
        {
            get { return email; }
            set { email = value; }
        }

        private string password;
        public string Password
        {
            get { return password; }
            set { password = value; }
        }
    }

-----Original Message-----
From: Alexandre Grenier [mailto:Alex.Grenier@markettools.com] 
Sent: Wednesday, May 03, 2006 11:13 AM
To: user-cs@ibatis.apache.org
Subject: Could not configure ResultMap

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