Menu

XMLMappingException

2006-01-30
2013-03-07
  • Anurag Jamloki

    Anurag Jamloki - 2006-01-30

    Hi,

    We have been using ObjectFramework for the last 2 years. But lately we are getting following error. This error occur only sometime. Most of the time it works fine. And every time it happens on diffrenet class. This is not set way of reproducing the error.

    Please help me on this.

    Thanks

    Anurag

    Following is the error:

    ObjectFramework.XMLMappingException: Could not add classmap SystemConfigAccount
    An entry with the same key already exists.
       at ObjectFramework.CXMLConfigLoader.IConfigLoader_loadConfig(HybridDictionary& dbMap, HybridDictionary& clMap) in C:\CTS\OrchestrateCRMCR005\ObjectFramework\CXMLConfigLoader.vb:line 175
       at ObjectFramework.CPersistenceBroker.loadConfig(_IConfigLoader configLoader) in C:\CTS\OrchestrateCRMCR005\ObjectFramework\CPersistenceBroker.vb:line 1306
       at ObjectFramework.modPersistenceBrokerSingleton.getPersistenceBrokerInstance() in C:\CTS\OrchestrateCRMCR005\ObjectFramework\modPersistenceBrokerSingleton.vb:line 96
       at ObjectFramework.CPersistentObject.Retrieve(CPersistentObject& obj, Boolean useCache) in C:\CTS\OrchestrateCRMCR005\ObjectFramework\CPersistentObject.vb:line 621
       at IWN.OrchestrateCRM.BusinessLayer.UserProfile.Retrieve() in C:\CTS\OrchestrateCRMCR005\BusinessLayer\UserProfile.cs:line 91

     
    • Richard Banks

      Richard Banks - 2006-02-06

      Hi Anurag,

      Are you repeatedly loading the framework in different threads? Or running it under ASP.NET and loading the config file in the session start event?

      I may not have ensure thread safety in all situations and it's possible that I've missed something.  I haven't got the MSDN docs open at the moment so I can't check if the Hybrid Dictionary is also thread safe.

      Anyway, that would be my guess.

      I'm glad to hear it's still going well after 2 years.  Have you made any changes in that time?

       
    • Anurag Jamloki

      Anurag Jamloki - 2006-02-27

      Hi Richard,

      Yes we did some changes, but all changes were minor one.

      I think the issue is releated to thread safety.

      What I have done is made the CXMLConfigLoader as singleton class. It seems to work.

      Before rolling it out to production environment I want to ask you.

      Can you think of anything that it might fail. or its not the thing I should do.

      Thanks and Regards

      Anurag

       
      • Richard Banks

        Richard Banks - 2006-02-28

        Hi Anurag,

        Any software has issues and there are still a few unresolved items with the framework (see the issue tracker for details).

        I would always recommend that any system be thoroughly tested in an environment that is a close to production as possible, and that it be load and performance tested to your satisfaction.

        If you've done these things and you are happy to move it to production, go for your life!  If not, take a little more time to be sure.  At the end of the day, it's your call.  I don't know your application or the risks and costs involved in a production release but you do and you need to make the decision.

        - Richard.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.