ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan MacDonald" <r...@ryanmacdonald.net>
Subject sqlMap Configuration Issue
Date Fri, 18 May 2007 18:57:28 GMT
I'm new to Ibatis.net and am still trying to get my first app working with
it. I'm running into the problem when my sqlMap is configured at runtime. It
can't seem to find my assembly with my class definitions. The assembly is in
my App_Code folder and is called "Newbydev.User" which contains the class
definition for a UserBasic. Any help is greatly appreciated. Here's the
error I'm getting:

 

Could not load type from string value 'User.UserBasic'. 

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code. 

Exception Details: System.TypeLoadException: Could not load type from string
value 'User.UserBasic'.

Source Error: 


 

Line 52:     private void cmdLogin_Click(Object sender, EventArgs e)

Line 53:     {

Line 54:         User.UserServices.Authenticate(txtUser.Text, txtPass.Text);

Line 55:     }

Line 56: }


Source File: d:\webspace\newbydevcom\newbydev.com\www\MasterPage.master.cs
Line: 54 

Stack Trace: 


 

[TypeLoadException: Could not load type from string value 'User.UserBasic'.]

   IBatisNet.Common.Utilities.TypesResolver.TypeResolver.ResolveType(String
typeName) +242

   IBatisNet.Common.Utilities.TypesResolver.TypeResolver.Resolve(String
typeName) +29

 
IBatisNet.Common.Utilities.TypesResolver.CachedTypeResolver.Resolve(String
typeName) +135

   IBatisNet.Common.Utilities.TypeUtils.ResolveType(String typeName) +28

 
IBatisNet.DataMapper.Configuration.ResultMapping.ResultMap.Initialize(Config
urationScope configScope) +62

 

[ConfigurationException: Could not configure ResultMap named
"User.userBasicResult", Cause: Could not load type from string value
'User.UserBasic'.]

 
IBatisNet.DataMapper.Configuration.ResultMapping.ResultMap.Initialize(Config
urationScope configScope) +292

 
IBatisNet.DataMapper.Configuration.Serializers.ResultMapDeSerializer.Deseria
lize(XmlNode node, ConfigurationScope configScope) +129

   IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.BuildResultMap() +134

   IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureSqlMap()
+1283

   IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Initialize() +5041

   IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument
document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean
isCallFromDao) +239

 

[ConfigurationException: 

- The error occurred while Validate SqlMap config.

- initialize ResultMap

- The error occurred in <sqlMap resource="${datamaps}/User.xml"
xmlns="http://ibatis.apache.org/dataMapper" />.  

- Check the User.userBasicResult.]

   IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument
document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean
isCallFromDao) +293

 
IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(String
resource, ConfigureHandler configureDelegate) +181

   IBatisNet.DataMapper.Mapper.InitMapper() +71

   IBatisNet.DataMapper.Mapper.Instance() +62

   Newbydev.UserServices.GetUserBasicByLogin(String Login) +29

   Newbydev.UserServices.Authenticate(String username, String password) +56

   MasterPage.cmdLogin_Click(Object sender, EventArgs e) in
d:\webspace\newbydevcom\newbydev.com\www\MasterPage.master.cs:54

   System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +105

   System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String
eventArgument) +115

 
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.Ra
isePostBackEvent(String eventArgument) +7

   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11

   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33

   System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

 

And this is part of my my sqlMap.xml file

 

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

 

<sqlMap namespace="User"

xmlns="http://ibatis.apache.org/mapping"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >

 

  <resultMaps>

    <resultMap id="userBasicResult" class="Newbydev.User.UserBasic" >

      <result property="ID"            column="user_ID" />

      <result property="FirstName"     column="user_FName" />

      <result property="LastName"      column="user_Lname" />

      <result property="Login"         column="user_Login" />

      <result property="Password"      column="user_Password" />

      <result property="IsAdmin"       column="user_IsAdmin" />

      <result property="TryCount"      column="user_TryCount" />

      <result property="LastAttempt"   column="user_LastAttempt" />

    </resultMap>

  </resultMaps>

 

  <statements>

    <select id="selectUserBasic" parameterClass="Newbydev.User.UserBasic"
resultMap="userBasicResult" cacheModel="userCache">

      SELECT

      U.user_ID,

      U.user_FName,

      U.user_Lname,

      U.user_Login,

      U.user_Password,

      U.user_IsAdmin,

      U.user_TryCount,

      U.user_LastAttempt

      FROM

      tbl_User U

      <dynamic prepend="WHERE">

        <isNotNull property="ID">

          U.user_ID = #ID#

        </isNotNull>

        <isNotEmpty property="Login">

          U.user_Login = #Login#

        </isNotEmpty>

      </dynamic>

    </select>

  </statements>

 

</sqlMap>


Mime
View raw message