My apologies, I should have updated to the most current SVN version of the code, rather than reporting on last Monday’s, which few people are probably using.  I updated to the most current version tonight and the problem is still there.

 

The exception I mentioned before seems to stem from a TypeLoadingException (trying to load my Domain.Customer type), which is thrown from TypeResolver.cs (line 114).  To test loading this type, manually, I created a Domain.Customer object myself, right before calling builder.configure(), and it fixed the problem.  The bottom line is that it seems I have to create a Domain.Customer object somewhere in my code, before configuring the DAO.

 

Is this a bug?  Am I doing something wrong in starting up the DAO?  Any advice would be appreciated.

 

Thank you,

 

Peter


From: Peter Mills [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 24, 2005 3:46 PM
To: [email protected]
Subject: Race condition in last Monday's SVN code?

 

I’m getting an exception in my test code, depending on at what point in my code I call:

 

DomDaoManagerBuilder builder = new DomDaoManagerBuilder();

builder.Configure("dao.config");

 

If I put this code directly in my test method (i.e. TestGetCustomer), prior to using the DAO, then all is well.  Unfortunately, if I factor out that code (for simplicity, with only 1 test fixture, this could be put in the class’ constrictor or [TestFixtureSetup] method), then I get the following exception:

 

Persistence.Test.CustomerSqlMapDaoTest.GetCustomer :

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

 

If I ignore the session handler configuration in my dao.config, then I get a similar “simple” DaoSessionHandler exception.

 

Strangely, although, with the code in the test fixture class’ constrictor or [TestFixtureSetup], the code fails in isolation, the code runs perfectly if it is run as part of a test suite and it is NOT the first test case in the suite.

 

I’m developing in whidby (VS 2005) beta 2, and using the SVN code from last Monday.

 

Peter

 

 

Reply via email to