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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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?
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
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.