Thanks for you reply. I have downloaded the latest source build (Source Revision 356824) from the website and converted and included the DataMapper, DataAccess, Common, and CommonLogging.Log4Net projects into visual studio 2005. (By the way kudos to everyone that wrote these assemblies because they compile and load flawlessly into visual studio 2005) I have included the full stack trace in this message:
Stack Trace. IBatisNet.Common.Exceptions.ConfigurationException was unhandled Message="\n- The error occurred while configure DaoSessionHandler.\n- The error occurred in <property name=\"resource\" value=\"SqlMap.config\" xmlns=\"http://ibatis.apache.org/dataAccess\" />. \n- Check the IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler." Source="IBatisNet.DataAccess" StackTrace: at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.BuildDaoManagers (XmlDocument document, Boolean useConfigFileWatcher) in D:\Data\Visual Studio 2005\Projects\IBATIS_TEST\IBatisNet.DataAccess\Configuration\DomDaoManag erBuilder.cs:line 354 at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.Configure(String resource) in D:\Data\Visual Studio 2005\Projects\IBATIS_TEST\IBatisNet.DataAccess\Configuration\DomDaoManag erBuilder.cs:line 202 at Test.Service.AccountService..ctor() in D:\Data\Visual Studio 2005\Projects\IBATIS_TEST\Test.Service\AccountService.cs:line 40 at Test.Client.Form1.button1_Click(Object sender, EventArgs e) in D:\Data\Visual Studio 2005\Projects\IBATIS_TEST\Test.Client\Form1.cs:line 30 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.U nsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at Test.Client.Program.Main() in D:\Data\Visual Studio 2005\Projects\IBATIS_TEST\Test.Client\Program.cs:line 17 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() dao.config: <?xml version="1.0" encoding="utf-8"?> <daoConfig xmlns="http://ibatis.apache.org/dataAccess" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <context id="SqlMapDao" default="true"> <!-- ==== Sql Server : SqlClient configuration ========= --> <database> <provider name="sqlServer1.1"/> <dataSource name="SqlServer" connectionString="data source=(local)\NetSDK;database=TEST;user id=sa;password=dofa7h;connection reset=false;connection lifetime=5; min pool size=1; max pool size=50"/> </database> <daoSessionHandler id="SqlMap"> <property name="resource" value="SqlMap.config"/> </daoSessionHandler> <daoFactory> <dao interface="Test.Persistance.Dao.Interface.Accounts.IaccountDao, Test.Persistance" implementation="Test.Persistance.Dao.Implementations.Accounts.AccountDao , Test.Persistance"/> </daoFactory> </context> </daoConfig> Randall Svancara Web Developer -----Original Message----- From: Ron Grabowski [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 29, 2006 8:18 PM To: [email protected] Subject: RE: DataAccess problems Could you post your dao.config file? Since you're running in Debug mode, can you provide the exact line number that is causing the exception. Or re-paste your stack trace when ran in Debug mode. It should contain line numbers. --- "Svancara, Randall - CO 7th" <[EMAIL PROTECTED]> wrote: > I rebuilt the source from the website http://ibatis.apache.org. I am > using Source Revision 356824. I have loaded all the debugging > symbols. > Now when I run my test, the following code throws an exception in the > DomDaoManagerBuilder class: > > /// <summary> > /// Build DaoManagers from config document. > /// </summary> > // [MethodImpl(MethodImplOptions.Synchronized)] > public void BuildDaoManagers(XmlDocument document, bool > useConfigFileWatcher) > { > ConfigurationScope configurationScope = new > ConfigurationScope(); > > configurationScope.UseConfigFileWatcher = > useConfigFileWatcher; > configurationScope.DaoConfigDocument = document; > > configurationScope.XmlNamespaceManager = new > XmlNamespaceManager(configurationScope.DaoConfigDocument.NameTable); > > configurationScope.XmlNamespaceManager.AddNamespace(DAO_NAMESPACE_PREFIX > , DAO_XML_NAMESPACE); > > configurationScope.XmlNamespaceManager.AddNamespace(PROVIDERS_NAMESPACE_ > PREFIX, PROVIDER_XML_NAMESPACE); > > try > { > GetConfig( configurationScope ); > } > catch(Exception ex) > { > throw new ConfigurationException( > configurationScope.ErrorContext.ToString(), ex); > } > } > > Randall Svancara > Web Developer > OFFICE (208) 334-6992 > OFFICE CELL (208) 867-0715 > > > -----Original Message----- > From: Svancara, Randall - CO 7th [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 29, 2006 12:10 PM > To: [email protected] > Subject: RE: DataAccess problems > > HERE IS THE CONSTRUCTOR IN MY DAO object that is blowing up on me: > > public AccountService() > { > > try > { > //_daoManager = > ServiceConfig.GetInstance().DaoManager; > DomDaoManagerBuilder builder = new > DomDaoManagerBuilder(); > builder.Configure("dao.config"); > _daoManager = DaoManager.GetInstance("SqlMapDao"); > if (_daoManager == null) > { > Log.Info("daoManager is null you fool"); > > } > //_accountDao = > _daoManager.GetDao(typeof(IAccountDao)) > as IAccountDao; > _accountDao = > (IAccountDao)_daoManager[typeof(IAccountDao)]; > }catch(Exception E) > { > Log.Error("** Error: " + E.Message + "--" + > E.InnerException); > throw new DataAccessException("Error executing > AccountService. Cause :" + E.Message, E); > > } > } > > Randall Svancara > Web Developer > > > -----Original Message----- > From: Svancara, Randall - CO 7th [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 29, 2006 12:01 PM > To: [email protected] > Subject: RE: DataAccess problems > > STACK TRACE > > See the end of this message for details on invoking > just-in-time (JIT) debugging instead of this dialog box. > > ************** Exception Text ************** > IBatisNet.DataAccess.Exceptions.DataAccessException: Error executing > AccountService. Cause : > - The error occurred while configure DaoSessionHandler. > - The error occurred in <property name="resource" > value="SqlMap.config" > xmlns="http://ibatis.apache.org/dataAccess" />. > - Check the > IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler. ---> > IBatisNet.Common.Exceptions.ConfigurationException: > - The error occurred while configure DaoSessionHandler. > - The error occurred in <property name="resource" > value="SqlMap.config" > xmlns="http://ibatis.apache.org/dataAccess" />. > - Check the > IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler. ---> > IBatisNet.Common.Exceptions.ConfigurationException: DaoManager could > not > configure SqlMapDaoSessionHandler.Cause: ---> > IBatisNet.Common.Exceptions.ConfigurationException ---> > System.NullReferenceException: Object reference not set to an > instance > of an object. > at > IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Initialize() > at > IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument > document, DataSource dataSource, Boolean useConfigFileWatcher, > Boolean > isCallFromDao) > --- End of inner exception stack trace --- > at > IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument > document, DataSource dataSource, Boolean useConfigFileWatcher, > Boolean > isCallFromDao) > at > IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument > document, DataSource dataSource, Boolean useConfigFileWatcher, > NameValueCollection properties) > at > IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler.Configur > e(NameValueCollection properties, IDictionary resources) > --- End of inner exception stack trace --- > at > IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler.Configur > e(NameValueCollection properties, IDictionary resources) > at > IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.GetContexts(Conf > igurationScope configurationScope) > at > IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.BuildDaoManagers > (XmlDocument document, Boolean useConfigFileWatcher) > --- End of inner exception stack trace --- > at > IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.BuildDaoManagers > (XmlDocument document, Boolean useConfigFileWatcher) > at > IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.Configure(String > resource) > at Test.Service.AccountService..ctor() in D:\Data\Visual Studio > 2005\Projects\IBATIS_TEST\Test.Service\AccountService.cs:line 40 > --- End of inner exception stack trace --- > at Test.Service.AccountService..ctor() in D:\Data\Visual Studio > 2005\Projects\IBATIS_TEST\Test.Service\AccountService.cs:line 52 > at Test.Client.Form1.button1_Click(Object sender, EventArgs e) in > D:\Data\Visual Studio > 2005\Projects\IBATIS_TEST\Test.Client\Form1.cs:line 30 > at System.Windows.Forms.Control.OnClick(EventArgs e) > at System.Windows.Forms.Button.OnClick(EventArgs e) > at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) > at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons > button, Int32 clicks) > at System.Windows.Forms.Control.WndProc(Message& m) > at System.Windows.Forms.ButtonBase.WndProc(Message& m) > at System.Windows.Forms.Button.WndProc(Message& m) > at > System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& > m) > at > System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& > m) > at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 > msg, > IntPtr wparam, IntPtr lparam) > > > ************** Loaded Assemblies ************** > mscorlib > Assembly Version: 2.0.0.0 > Win32 Version: 2.0.50727.42 (RTM.050727-4200) > CodeBase: > file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll > ---------------------------------------- > Test.Client > Assembly Version: 1.0.0.0 > Win32 Version: 1.0.0.0 > CodeBase: > file:///D:/Data/Visual%20Studio%202005/Projects/IBATIS_TEST/Test.Client/ > bin/Debug/Test.Client.exe > ---------------------------------------- > === message truncated === The information contained in this email may be privileged, confidential or otherwise protected from disclosure. All persons are advised that they may face penalties under state and federal law for sharing this information with unauthorized individuals. If you received this email in error, please reply to the sender that you have received this information in error. Also, please delete this email after replying to the sender.

