Alex,
Are you deploying your AccountMap.xml, sqlmap.config, and providers.config
files to bin via post-build event or similar? Is your Domain.dll assembly
also in that dir?
Maybe you could detail your exact file structure in test execution
directory.
What do you get if you change assignment statement to:
SqlMapper mapper = Mapper.Instance();
I'm pretty new to iBatis myself but didn't have any trouble getting it to
work with .NET 2.0
Luke
-----Original Message-----
From: Alexandre Grenier [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 04, 2006 4:26 PM
To: [email protected]
Subject: RE: Could not configure ResultMap
Thanks Ron,
It was actually set to false. I did try both.
I also put the fully qualified class in resultMap, and still have the same
null reference error:
- 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.
<resultMaps>
<resultMap id="AAPResult" class="Domain.AccountAuthenticateParam,
Domain">
<result property="Email" column="email" />
<result property="Password" column="password" />
</resultMap>
</resultMaps>
If I mangle the class name or assembly, the error changes to "could not load
type". Still can't figure out what's wrong.
Unfortunately, because of time constraints/pressure, I may be forced to give
up on iBatis.. It would be a real bummer, because it would definitely be a
better solution if we can get past these initial problems.
If someone has a simple working unit test project in C# 2.0, please send a
zip to [EMAIL PROTECTED] ...
Thanks!
Alex
-----Original Message-----
From: Ron Grabowski [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 03, 2006 8:43 PM
To: [email protected]
Subject: RE: Could not configure ResultMap
Do you have namespaces enabled in your sqlMap.config file?
<setting useStatementNamespaces="true"/>
If so, you'll need to prefix the name of your resultMap:
<select id="AAPSelect" parameterClass="int"
resultMap="Domain.AAPResult">
--- Alexandre Grenier <[EMAIL PROTECTED]> wrote:
>
> I figured it was irrelevant (doesn't seem to go that far) so I left it
> out for clarity. Here it is (was right below resultMaps tag):
>
> <statements>
> <select id="AAPSelect" parameterClass="int"
> resultMap="AAPResult">
> SELECT email, password
> FROM accounts
> WHERE id = #value#
> </select>
> </statements>
>
> I'm still totally puzzled by this null reference exception!