ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clough, Samuel \(USPC.PRG.Atlanta\)" <Samuel_Clo...@princetonrg.com>
Subject RE: sqlMap Configuration Issue
Date Fri, 18 May 2007 19:07:53 GMT
Sorry, I missed that.  I'll have to let some other experts answer that.
We've only used iBatis with business layers that were in their own


From: Ryan MacDonald [mailto:ryan@ryanmacdonald.net] 
Sent: Friday, May 18, 2007 3:06 PM
To: user-cs@ibatis.apache.org
Subject: RE: sqlMap Configuration Issue

Ok, do I have to use a precompiled assembly (.dll)? Right now I'm just
trying to use a .cs file in my app_code folder and it gets compiled at
runtime. Can I do it that way or do I need to compile it first?




From: Clough, Samuel (USPC.PRG.Atlanta)
Sent: Friday, May 18, 2007 3:03 PM
To: user-cs@ibatis.apache.org
Subject: RE: sqlMap Configuration Issue


Where you specify your class, put a comma after the name of the class
and then the name of your assembly minus the .dll extension.  Also, to
make your life easier you could use an alias at the top of your mapping
file so that you can give the type a name and then only have one place
that lists the full name and the assembly name.



From: Ryan MacDonald [mailto:ryan@ryanmacdonald.net] 
Sent: Friday, May 18, 2007 2:57 PM
To: user-cs@ibatis.apache.org
Subject: sqlMap Configuration Issue

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,

Line 55:     }

Line 56: }

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

Stack Trace: 


[TypeLoadException: Could not load type from string value

typeName) +242

typeName) +29

ng typeName) +135

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

nfigurationScope configScope) +62


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

nfigurationScope configScope) +292

erialize(XmlNode node, ConfigurationScope configScope) +129




document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean
isCallFromDao) +239



- 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.]

document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean
isCallFromDao) +293

ring 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)

   MasterPage.cmdLogin_Click(Object sender, EventArgs e) in

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

eventArgument) +115

r.RaisePostBackEvent(String eventArgument) +7

sourceControl, String eventArgument) +11

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

includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


And this is part of my my sqlMap.xml file


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


<sqlMap namespace="User"


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



    <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" />





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











      tbl_User U

      <dynamic prepend="WHERE">

        <isNotNull property="ID">

          U.user_ID = #ID#


        <isNotEmpty property="Login">

          U.user_Login = #Login#








Princeton Retirement Group, Inc - Important Terms 

This E-mail is not intended for distribution to, or use by, any person
or entity in any location where such distribution or use would be
contrary to law or regulation, or which would subject Princeton
Retirement Group, Inc. or any affiliate to any registration requirement
within such location. 

This E-mail may contain privileged or confidential information or may
otherwise be protected by work product immunity or other legal rules. No
confidentiality or privilege is waived or lost by any mistransmission.
Access, copying or re-use of information by non-intended or
non-authorized recipients is prohibited. If you are not an intended
recipient of this E-mail, please notify the sender, delete it and do not
read, act upon, print, disclose, copy, retain or redistribute any
portion of this E-mail. 

The transmission and content of this E-mail cannot be guaranteed to be
secure or error-free. Therefore, we cannot represent that the
information in this E-mail is complete, accurate, uncorrupted, timely or
free of viruses, and Princeton Retirement Group, Inc. cannot accept any
liability for E-mails that have been altered in the course of delivery.
Princeton Retirement Group, Inc. reserves the right to monitor, review
and retain all electronic communications, including E-mail, traveling
through its networks and systems (subject to and in accordance with
local laws). If any of your details are incorrect or if you no longer
wish to receive mailings such as this by E-mail please contact the
sender by reply E-mail. 


View raw message