Thanks, That worked...from that I also figured the map file (*.xml) should be xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> just incase others run into the same problem. Regards, Phillip
Subject: RE: The error occurred while Validate SqlMap configDate: Fri, 24 Aug 2007 13:27:06 -0500From: [EMAIL PROTECTED]: [email protected] Your issue is most likely in this line: <sqlMapConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> Notice you have ‘:xsi’ where it is not needed. It should be like this: <sqlMapConfig xmlns="http://ibatis.apache.org/dataMapper" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> Regards, Tom Nguyen Sr. [EMAIL PROTECTED] From: Phillip S [mailto:[EMAIL PROTECTED] Sent: Friday, August 24, 2007 12:07 PMTo: [EMAIL PROTECTED]: The error occurred while Validate SqlMap config Team, I am beside myself on this one. I Spent all morning on it. I have not a clue on this. I am basically trying to create a sample for testing IBastis. -------------sqlmap.config--------------<?xml version="1.0" encoding="UTF-8" ?><sqlMapConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <settings> <setting cacheModelsEnabled="true"/> <setting useStatementNamespaces="false"/> <setting validateSqlMap="false"/> <setting useReflectionOptimizer="true"/> </settings> <database> <provider name="sqlServer2.0"/> <dataSource name="TestServer" connectionString="Data Source=testdbserver;Initial Catalog=TEST257;user=user1;password=abc123;" /> </database> <sqlMaps> <sqlMap resource="User.xml"/> </sqlMaps></sqlMapConfig> -------------User.xml-------------<?xml version="1.0" encoding="UTF-8" ?><sqlMap namespace="User" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ibatis.apache.org/mapping"> <alias> <typeAlias alias="User" type="QuickStart.Types.User, QuickStart.Types"/> </alias> <resultMaps> <resultMap id="UserResult" class="User"> <result property="Id" column="userid"/> </resultMap> </resultMaps> <statements> <select id="GetUser" resultMap="UserResult" parameterClass="String"> SELECT userid FROM dbo.Users <dynamic prepend="WHERE"> <isParameterPresent> userid = #value# </isParameterPresent> </dynamic> </select> </statements></sqlMap> ------------mapper.cs------------using System;using IBatisNet.Common.Utilities;using IBatisNet.DataMapper;using IBatisNet.DataMapper.Configuration;namespace QuickStart.DataAccess{public class Mapper{ private static volatile ISqlMapper _mapper = null; private Mapper() { } protected static void Configure(object obj) { _mapper = null; } public static ISqlMapper Get() { return Instance(); } protected static void InitMapper() { ConfigureHandler handler = new ConfigureHandler(Configure); DomSqlMapBuilder builder = new DomSqlMapBuilder(); _mapper = builder.ConfigureAndWatch(handler); } public static ISqlMapper Instance() { if (_mapper == null) { lock (typeof(SqlMapper)) { if (_mapper == null) { InitMapper(); } } } return _mapper; }}} -----------mapperFixture-----------[Test]public void InstanceTest(){ ISqlMapper mapper = Mapper.Instance();} I am simply trying to test that I can an instance and all the config loads fine but instead I get the following: Message: - The error occurred while Validate SqlMap config.Type: IBatisNet.Common.Exceptions.ConfigurationExceptionSource: IBatisNet.DataMapperTargetSite: IBatisNet.DataMapper.ISqlMapper Build(System.Xml.XmlDocument, IBatisNet.Common.DataSource, Boolean, Boolean)HelpLink: nullStack: at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean isCallFromDao)at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(String resource, ConfigureHandler configureDelegate)at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(ConfigureHandler configureDelegate)at QuickStart.DataAccess.Mapper.InitMapper() in C:\Development\iBATIS\QuickStart\Source\QuickStart.DataAccess\Mapper.cs:line 31at QuickStart.DataAccess.Mapper.Instance() in C:\Development\iBATIS\QuickStart\Source\QuickStart.DataAccess\Mapper.cs:line 43at QuickStart.DataAccess.Test.MapperFixture.InstanceTest() in C:\Development\iBATIS\QuickStart\Test\QuickStart.DataAccess.Test\MapperFixture.cs:line 17 The innerr exception is :Message: Object reference not set to an instance of an object.Type: System.NullReferenceExceptionSource: IBatisNet.DataMapperTargetSite: Void ParseGlobalProperties()HelpLink: nullStack: at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ParseGlobalProperties()at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Initialize()at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean isCallFromDao) Any help would be greatly appreciated. Recharge--play some free games. Win cool prizes too! Play It! This e-mail message and any files transmitted herewith, are intended solely for the use of the individual(s) addressed and may contain confidential, proprietary or privileged information. If you are not the addressee indicated in this message (or responsible for delivery of this message to such person) you may not review, use, disclose or distribute this message or any files transmitted herewith. If you receive this message in error, please contact the sender by reply e-mail and delete this message and all copies of it from your system. _________________________________________________________________ Recharge--play some free games. Win cool prizes too! http://club.live.com/home.aspx?icid=CLUB_wlmailtextlink

