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 Thu, 04 May 2006 23:26:13 GMT
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 alex.grenier@markettools.com ...

Thanks!

Alex


-----Original Message-----
From: Ron Grabowski [mailto:rongrabowski@yahoo.com] 
Sent: Wednesday, May 03, 2006 8:43 PM
To: user-cs@ibatis.apache.org
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 <Alex.Grenier@markettools.com> 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!

Mime
View raw message