Uploaded image for project: 'iBatis for .NET'
  1. iBatis for .NET
  2. IBATISNET-259

The error occurred while configure DaoSessionHandler.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • DataAccess 1.9 .1, DataMapper 1.6.1
    • None
    • DataAccess, DataMapper
    • None
    • Windows XP SP2, VS 2005 SP1, SQL Server 2005

    Description

      Hi,

      I'm currently developing an application framework for the company I work for, and having used iBatis for Java very successfully in the past, I suggested we use iBatis.Net for our .Net development.
      The folder structure is somewhat different to the samples, sO I've had to step through the source code for iBatis in order to determine what changes I need to make to my dao.config and sqlmap.config files in order to get the system to work.
      I developed a sample applicaiton to demo the functionality and structure - but this was a single EXE in a single folder, and everything worked fine.
      In my framework, there are multiple projects (application components etc.) running from different folders.
      MainApp
      MainApp\Plugins\GeneralLedger
      etc.
      The basic idea is that each plugin has it's own DAO components required to fulfill it's specific functionality and has nothing to do with other components or plugins.
      As I mentioned, I had to add the iBatis projects to my solution so that I could step through the code in order to determine what I needed to change within the config files - by default the config files are loaded under the Application.StartupPath folder, where I need them loaded from their respective plugin folders etc.
      I finally managed to get the application working while referencing the iBatis source code.
      I then removed iBatis from my solution and added references to the original .Net 2.0 compiled DLLs (in my Build\Components folder), and now the application does not run and generates the error above.

      The relevant portion of the stack trace is as follows:

      • The error occurred while configure DaoSessionHandler.
      • The error occurred in <property name="resource" value=".\Plugins\GeneralLedger\sqlMap.config" xmlns="http://ibatis.apache.org/dataAccess" />.
      • Check the IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler. - at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.BuildDaoManagers(XmlDocument document, Boolean useConfigFileWatcher)
        at IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.Configure(String resource)
        at Blanford.GL.DAL.DAL.init() in C:\Development\DotNet\Blanford\Software\Plugins\PluginGL\GL_DAL\DAL.vb:line 30

      The init method contains the following code:
      If m_glAccountTypesDao Is Nothing Then
      m_builder = New DomDaoManagerBuilder()
      m_builder.Configure(".\plugins\generalledger\dao.config")
      m_daoManager = DaoManager.GetInstance()
      m_glAccountTypesDao = CType(m_daoManager.GetDao(GetType(IGl_accounttypeDao)), IGl_accounttypeDao)
      m_glGeneralLedgerDao = CType(m_daoManager.GetDao(GetType(IGl_generalledgerDao)), IGl_generalledgerDao)
      m_glTransactionDao = CType(m_daoManager.GetDao(GetType(IGl_transactionDao)), IGl_transactionDao)
      End If

      The line that causes the issue (line 30) is the line that calls the m_builder.Configure(".\plugins\generalledger\dao.config")

      Once again, the issue only occurs when I reference the iBatis DLLs - when I run through source code it works perfectly, making it impossible for me to trap the cause of the issue.

      As you can imagine, this is currnetly preventing us form continuing with the development as data access is core to the system and without being able to get a sample working....
      Thanx,
      Alon

      Attachments

        Activity

          People

            Unassigned Unassigned
            wizard Alon Hirsch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: